1. 下载node.js
直接安装就好,安装完后,在/usr/local 目录
2. 桌面新建一个blog文件夹
cd blog目录
3.安装hexo
npm install -g hexo
hexo init
hexo g (hexo generate)
hexo s (hexo server)
4. 和github关联
deploy:
type: git
repository: https://github.com/bobofeng/bobofeng.github.io.git
branch: master
然后执行
hexo d (hexo deploy)
5. 遇到的错误
执行hexo deploy之后,没有任何反应,任何提示,是因为_config.yml 配置有问题 deploy type repository branch 只有必须要有空格
改过之后,继续执行hexo deploy的话,提示
ERROR Deployer not found: git
需要执行下面的命令
npm install hexo-deployer-git --save
然后在执行hexo deploy就可以了