Build Blog with Github and Hexo

Beginning the blog journey of Hexo & Gituhub

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Create a domain of yourself bolg website

Step 1

Register on Godaddy, If possible, also should to use CDN on DNSPod

Step 2

Create Personal Rep. on github, and name the Rep. is , add the README.md file to describe the Rep.

Step 3

Using ping to get github pages ip < 103.245.222.133>

Step 4

On Mac OS, the necessary thing is to download Xcode CommandLine Tools in AppStore, and then

1
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Step 5

Install jekyll (optional)

1
2
$ sudo gem update --system
$ sudo gem install jekyll

Install Hexo (use)

  • Install Xcode and Node.js
  • Install Hexo on mac
1
2
3
4
$ sudo npm install hexo-cli -g
$ mkdir blog
$ cd blog
$ hexo init & npm install

Configure the homepage by

Update

Update hexo

1
$ npm update -g hexo

Update themes

1
2
$ cd themes/next
$ git pull

Update plugins

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ npm update
```

### Add plugins

``` bash
npm install hexo-generator-index --save
npm install hexo-generator-archive --save
npm install hexo-generator-category --save
npm install hexo-generator-tag --save
npm install hexo-server --save
npm install hexo-deployer-git --save
npm install hexo-deployer-heroku --save
npm install hexo-deployer-rsync --save
npm install hexo-deployer-openshift --save
npm install hexo-renderer-marked@0.2.7 --save
npm install hexo-renderer-stylus@0.3.0 --save
npm install hexo-generator-feed@1.0.3 --save
npm install hexo-generator-sitemap@1.0.1 --save