What is Hexo?

Check documentation for knowledge.

Requirements

Hexo is runing based dependency.We should have a couple of other things installed first:

Install Git

  • Windows: Download & install git.
  • Linux (Ubuntu, Debian): sudo apt-get install git-core
  • Linux (Fedora, Red Hat, CentOS): sudo yum install git-core

Install Node.js

  • Window: Download & intall Node.js
  • Linux: nvm install stable

Notes:
System environment should be setted.
npm config set prefix “C:\Program Files\nodejs\node_global”.
npm config set cache “C:\Program Files\nodejs\node_cache”.
Append user environment variable Path with “C:\Program Files\nodejs\node_cache”.
New a system environment variable named NODE_PATH and set value “C:\Program Files\nodejs\node_global\node_modules”.
Fource environment effective.

Install Hexo

Once all the requirements are installed, you can install Hexo with npm.

Installing Hexo is quite easy. However, you do need to have a couple of other things installed first:

1
$ npm install -g hexo-cli

Onece Hexo is installed,run the following commands to initialise Hexo in the target .

1
$ hexo init <folder>

Install Theme

1
$ git clone https://github.com/wuchong/jacman.git themes/jacman

Config _config.yml

Basic Usage

Creating 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