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.

Prepare work

Install hexo

1
$ sudo npm install -g hexo-cli

Create your Project

1
2
3
4
5
$ hexo init myblog

$ cd myblog

$ npm install

Config your github address

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ vi _config.yml

~~~~~~~~~~~~~~~~~~ _config.yml ~~~~~~~~~~~~~~~~~~
# Site
title: your title
subtitle:
description: personal blog
author: jxli

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url:
root:
permalink: :year/:month/:day/:title/
permalink_defaults:

Configure you Git

1
2
3
4
5
6
7
8
9
10
$ npm install hexo-deployer-git --save
$ vi _config.yml

~~~~~~~~~~~~~~~~~~ _config.yml ~~~~~~~~~~~~~~~~~~
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git
repo: your-repo.git
branch: master

Quick Start

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