hexo is a static blog platform based on Nodejs by tommy351, using Markdown (or other engine) to parse post, and the most exciting point is its fast enough as to parse hundreds of posts with seconds. After using ghost for several months, I decided to move my blog from ghost to hexo.
Before installing hexo, one needs to install nodejs and npm, which could be downloaded and installed from the official site nodejs. And be sure that git is installed as well
1
sudo npm install -g hexo-cli hexo-server
Getting Started With Hexo
Hexo is easy to use, and most commands have abbreviation, like:
1
hexo generate
is equivalent to
1
hexo g
In the following, we use the convention to include full command ant its abbr.
1
hexo g[enerate]
Init a project
1 2
hexo init [folder] cd [folder] && nam install
If no [folder], hexo will initialize the current directory.
Generate Static Web Pages
1
hexo g[enerate]
Create New Post/Page
1 2
hexo n[ew] "title" hexo n[ew] page "title"
Deploy Your Blog
1
hexo d[eploy]
Here one needs to have the project properly configured.
Publish Your Draft
1
hexo p[ublish] 'draft' post/page
Clean Existed Files
1
hexo c[lean]
Run Hexo Server
Run a hexo server to publish your site:
1
hexo s[erver]
Render Your Blog
1
hexo render
Other Commands
1 2
hexo help hexo version
Composite Command
Several commands can be combined,
1 2
hexo d[eploy] -g # create and deploy hexo s[erver] -g # create and preview
Developing Your Hexo
Basic Configuration
Noting that there is a space after the colon followed by each option, like
1 2 3 4
### right configuration aaa: bbb ### wrong configuration aaa:bbb