Hexo User's Guidance

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

Install Node.js

Node.js provides official installer for most platforms.

Alternative installation methods:

1
# tar -C /usr/local --strip-components 1 -xzf node-v16.13.0-linux-x64.tar.gz
  • Others: Install it through respective package manager. Refer to the guide provided by Node.js.

Advanced installation and usage

Advanced users may prefer to install and use hexo package instead.

1
$ npm install hexo

Once installed, you can run Hexo in two ways:

  1. npx hexo <command>
  2. Linux users can set relative path of node_modules/ folder:
1
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile

then run Hexo using hexo <command>

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