Introduce

Hexo is an efficient static website generation framework, based on Node.js. With Hexo, you can easily use Markdown to write blog posts. In addition to the syntax of Markdown itself, you can also use the tag and category plugin provided by Hexo to quickly setup custom content. In this article, I will show you the basic usages of Hexo.

Here are the steps from Hexo official documentation.

Quick Start

Configuration

There are two config.yml files in Hexo directory. One is located in the root directory of the site and mainly contains the configuration of Hexo itself; the other is located in the theme directory. This configuration is provided by the theme author and is mainly used to configure theme-related options.

Create New Post

1
$ hexo new "New Post"

More info: Writing

Run Server

1
$ hexo server

More info: Server

Generate Static Files

1
2
$ hexo clean
$ hexo generate

More info: Generating

Deploy to GitHub

install the hexo-git plugin at the first time.

1
$ npm install hexo-deployer-git --save
1
$ hexo deploy

More info: Deployment

Furthermore

You may find hundreds of open-source blog theme on Hexo website. When applying different theme, just download corresponding theme code under themes/{your-theme}/ and then go to _config.yml to change the theme name.