github准备
新建一个项目:你的用户名.github.io(项目名称)
Hexo
- 安装node
- npm install hexo-cli -g
- hexo init 你的用户名.github.io // 尽量和Github仓库使用同一个名称
- cd 你的用户名.github.io
- hexo s
- 打开http://localhost:4000/
Next主题安装
- Next主题是iissnan所创作的一个Hexo主题,以简洁为主
- cd xxx.github.io
- git clone https://github.com/iissnan/hexo-theme-next themes/next
_config.yml站点配置
1 | # Hexo Configuration |
如果报错: ERROR Deployer not found: git
npm install –save hexo-deployer-git
部署
hexo clean && hexo g && hexo d
打包的项目在public中