1.本地安装Node
2.本地安装Git
3.Github上创建项目,项目名称:账号名.github.io
4.通过Node安装Hexo
| 1 | >pwd | 
5.将Hexo与Github page联接起来
- 设置Git的username和email - 1 
 2- git config --global user.name "yourname" 
 git config -global user.email "youremail"
- 如果本地没有.ssh 文件夹,则生成一个 - 1 - ssh-keygen -t rsa -C "tx_mu@163.com" 
6.添加密钥到ssh-agent
| 1 | eval "$(ssh-agent -s)" | 
7. 添加生成SSHkey到ssh-agent
| 1 | ssh -add ~/.ssh/id_rsa | 
8. 再Github上new ssh key, 将id-rsa.pub文件李的内容复制上去
9.输入
| 1 | ssh -T git@github.com | 
10.修改deployment,修改_config.yml文件
| 1 | deploy: | 
注意:
- 每个冒号后面必须有一个空格
- 命令:
 hexo clean; hexo g; hexo d; hexo server