Get Hexo running on Github Pages

Install Hexo

1
npm install hexo-cli -g

Initialize the blog

1
2
3
4
5
hexo init blog
npm install
hexo g #generate
hexo s #server
hexo d #deploy

To deploy on Github, we need to install git deployer and modify the _config.yml file in root:

1
npm install hexo-deployer-git --save

1
2
3
4
5
#Configure _config.yml
deploy:
type: git
repo: [email protected]:PhoenixPan/blog.git
branch: master

You have to add your local ssh key to your github account, otherwise you won’t be able to display the site, find instruction here

Install themes

Clone the new theme under themes directory

1
git clone https://github.com/iissnan/hexo-theme-next.git themes/next

References

hexo-theme-next
手把手教你使用Hexo + Github Pages搭建个人独立博客