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.


  1. Getting Started With Hexo
    1. Init a project
    2. Generate Static Web Pages
    3. Create New Post/Page
    4. Deploy Your Blog
    5. Publish Your Draft
    6. Clean Existed Files
    7. Run Hexo Server
    8. Render Your Blog
    9. Other Commands
    10. Composite Command
  2. Developing Your Hexo
    1. Basic Configuration
    2. Deploy Config
  3. Tuning Your Hexo
    1. Themes
    2. Plugins

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

sudo npm install -g hexo-cli hexo-server

Getting Started With Hexo

Hexo is easy to use, and most commands have abbreviation, like:

hexo generate

is equivalent to

hexo g

In the following, we use the convention to include full command ant its abbr.

hexo g[enerate]

Init a project

hexo init [folder]
cd [folder] && nam install

If no [folder], hexo will initialize the current directory.

Generate Static Web Pages

hexo g[enerate]

Create New Post/Page

hexo n[ew] "title"
hexo n[ew] page "title"

Deploy Your Blog

hexo d[eploy]

Here one needs to have the project properly configured.

Publish Your Draft

hexo p[ublish] 'draft' post/page

Clean Existed Files

hexo c[lean]

Run Hexo Server

Run a hexo server to publish your site:

hexo s[erver]

Render Your Blog

hexo render

Other Commands

hexo help
hexo version

Composite Command

Several commands can be combined,

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

### right configuration
aaa: bbb
### wrong configuration

Some basic options are followed below,

title: dark
subtitle: darkshell
description: a simple static blog
author: dark
language: en

url: http://yoursite.com

Deploy Config

One can easily deploy hexo project to github pages via git, or your personal server.

type: git
repository: git@github.com/darkshell/darkshell.io.git
branch: master

Tuning Your Hexo


hexo project 上有许多非常棒的主题, 下面是个人觉得很棒的主题.


http://hexo.io/plugins 上有很多插件, 可以按需安装.

npm install hexo-render-ejs --save
npm install hexo-render-stylus --save
npm install hexo-render-marked --save

水水更健康 O(∩_∩)O~