This is a step-by-step guide on how to deploy Hexo on Github Pages. I will use the configurations of this Hexo blog as an example.
- Install git.
- Install node-js.
- Install Hexo.
On Hexo’s website, there is a very detailed guide on how to finish the above three steps.
- Create a Github repository so that we can host Hexo generated blog pages by pushing them to the gh-pages branch.
Clone the created “blog” repository to local.
Open _config.yml, and edit the configurations.
Note: since we will deploy the blog to the gh-pages branch of the “blog” repository, we are actually deploying Hexo to a subdirectory called “blog” under anilot.github.io. Hence we need to change the url settings.
Also we need to change the deploy method so that Hexo can directly push the blog to Github.
Deploy to Github Pages
Enter your Github username and password.
Then we can access the blog at http://anilot.github.io/blog.
If you have any questions, feel free to leave a comment below.