###1. 本地安装
###2. 从github上导入
hexo init
//在文件夹下创建相应文件
INFO You are almost done! Don't forget to run 'npm install' before you start blogging with Hexo!
-
npm install
//创建node_modules目录 -
修改目录下的_config.yml文件
#Deployment
##Docs: http://hexo.io/docs/deployment.html
deploy:
以下是新增 type: git
//注意冒号后的空格 repository: git@github.com:name/name.git
//ssh格式而不是https格式,本地多个key的时候注意主机名
branch: master
ssh -T git@github.com
//本地多个key的时候,注意测试的主机名
###常见错误
hexo d
发布时提示'ERROR Deployer not found: git '
npm install hexo-deployer-git --save
再确认下_config.yml中的type是不是git