How to use Hexo to create a blog in Github

  1. Install Hexo
1
2
$ npm install -g hexo-cli
$ npm install hexo-deployer-git --save
  1. Create a project
1
2
3
$ npm hexo init myBlog
$ npm cd myBlog
$ npm npm install
  1. Run a test server for your page
1
$ hexo s

Open http://localhost:4000 in browser for review

  1. Create a repository in Github
    The repo name has to be .github.io

  2. Set information to use Git

1
$ vi _config.yml
  1. Create a new post file
1
$ hexo n "title"
  1. Edit the above file with Markdown
  2. Deploy your new blog!!
1
2
3
$ hexo g
$ hexo clean
$ hexo deploy