Create github io repo
Github provides free host for the blog. Simply follow instructions to create a repository naming .github.io
Get Hexo Ready
I used Hexo, which is a simple static blog framework built on Node.js, to create my pages. You can also use JekyII as recommended by github.
Intall Hexo
1
| $ npm install -g hexo-cli
|
Initialize Hexo blog under
1 2 3
| $ hexo init <my-blog-folder> $ cd <my-blog-folder> $ npm install
|
Find a theme, I used a Vue style one by yanm1ng
Download theme /theme
1 2 3
| $ cd <my-blog-folder> $ git clone <theme-git-repo> themes/<theme-name> $ cp -R themes/<theme-name>/_source/* source/
|
Update project _config.yml theme config
Deploy to your github io repo
Install hexo-git-deployer
1
| $ npm install hexo-deployer-git --save
|
Edit _config.yml
1 2 3
| deploy: type: git repo: https://github.com/dongnanzhy/dongnanzhy.github.io
|
Deploy
1
| $ hexo clean && hexo deploy
|
Add new blog
Create new post page under source/_posts
If image files included, add them under source/images
Deploy
1
| $ hexo clean && hexo deploy
|