To have your website available on the Internet, you need to generate the content and deploy it to your chosen service. You can deploy your site to a webserver such as apache, an Amazon S3 bucket, Heroku or Github Pages.
If you used the
hexo servercommand previously you should note that this does not generate the HTML files for your website.
As all your content has been written in markdown, you need to generate the HTML files for your site. Hexo has a generator that does this for you. Inside your Hexo website project, run the command:
public directory. You can copy these files manually, or configure Hexo to deploy the site for you.
As hexo is designed only a a site generator, you need a server to run your website on. You can run it on your own web server, a hosted web server or use a Cloud service like Github Pages.
As I am using Git to manage my hexo project, it makes sense to use Github pages to host my website. Github pages is really easy to use and performs very well.
Github pages is the easiest service I have found to deploy my Hexo websites on.
I am using two-factor authorisation with Git which seems to cause an authentication problem. To fix this I run
hexo deployto create the
.deploydirectory and put its contents under Git version control. Then I change into the
.deploydirectory and do a manual push to Github with the command
git push github master. From then on
hexo deployworks correctly.
To use a custom domain for your Hexo website, eg jr0cket.co.uk instead of jr0cket.github.io, then you need to add a file called
CNAME to the hexo project source directory
You will need to own this custom domain and set your domain to point to the actual web address. In the case of Github pages the web address would be
I created the above CNAME file and pointed my domain to
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket