Setting hexo blog and deploy it on Github page is a good idea. To make your life easier in the case that you dont know how to combine 2 things, this is for you.
General Setup
You will need Git, Nodejs and npm on your computer before doing the rest of tutorial.
You also need hexo:
1 | $ npm install -g hexo |
Hexo Setup
Install Hexo:
1 | $ npm install hexo-cli -g |
Create and init Hexo project:1
2
3$ hexo init blog
$ cd blog
$ npm install
Add a packet that supports deploying hexo blog to Github page:1
$ npm install hexo-deployer-git --save
Edit setting
Modify _config.yml file:1
2
3
4deploy:
type: git
repo: http://github.com/<yourusername>/<username>.github.io.git
branch: [branch]
Deploy:
Create github project yourusername.github.io.
Be aware, if you spell it wrong, things will not work.
To Github1
$ hexo deploy
For testing in local host:1
$ hexo server
Finally, dont forget to modify the “Hello World” post.