Set up your personal blog with hexo and github
Install
Install git
Install nodes
Install Hexo$ npm install -g hexo-cli
Hexo
Create blogMkdir blog
cd blog
Run init: hexo init
Generate static blog files: hexo generate
Test and Debug local: hexo server
And then browse: http://localhost:4000
Add a new blog post: hexo new "Hello Hexo”
Or generate through github repository
1 | cd .. && git clone https://github.com/taylortao/MyBlogRawMarkDownFile.git |
Support feed and sitemap$ npm install hexo-generator-feed --save
$ npm install hexo-generator-sitemap --save
Set deploy destination to GitHub
Add a new repository,and its name must be your_user_name.github.io
And then modify _config.yml:
vim _config.yml
In deploy section
1 | deploy: |
And then run
$ npm install hexo-deployer-git --save
hexo deploy
Browse: http://taylortao.github.io/
Regenerate:hexo clean
hexo generate
hexo deploy