hexo配置部署到github时,对应的_config.xml配置如下:

deploy:
   type: git
   repo: git@github.com:junhuih/junhuih.github.io.git
   branch: gh-pages

问题

在安装hexo并deploy到github时,默认安装会有下面错误:

blog$ hexo d
ERROR Deployer not found: git

解决方法

默认的hexo并没有安装对应gitdeployer的,需要在blog根目录下之行下面命令:

npm install hexo-deployer-git --save

然后按照正常的步骤发布即可:

hexo generate
hexo deploy