Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server


好了,以上是hexo默认的文档。

接下来,简单介绍下如何部署到github pages


适用于以下版本


hexo: 3.2.0


hexo-cli: 1.0.2


os: Windows_NT 10.0.10586 win32 x64


首先要添加SSH KEY,具体可以看这里


注意在Enter passphrase for key这一步时,直接回车即可,如果输入passphrase的话hexo deploy可能会报错

之后配置_config.yml

1
2
3
4
deploy:
type: git
repository: git@github.com:Cacivy/Cacivy.github.io.git
branch: master

1. tpye后面需要加一个半角空格


2. 3.0版本后type需要从github改为git


最后继续按文档来

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

SUCCESS