Overview
Target: Using Hexo to create Embux FAQ & Documentation website.
Note: Hexo is a fast, simple and powerful blog framework. You write posts in Markdown (or other languages) and Hexo generates static files with a beautiful theme in seconds.
Installation
Quick Guideline
- Pre-requirement: Node.js and Git
Install Hexo
$ npm install -g hexo-cli
fix git deploy error
npm install hexo-deployer-git –savehexo full text search
npm install hexo-generator-search –save
Refer:
- Hexo: Getting Started - Overview for detail information and installation steps.
- Hexo FAQ
Setup
- Initialize Hexo
1 | $ hexo init <folder> |
Note:
Once the initialization complete, the folder structure will like
1 | ├── _config.yml # the major config file |
Refer to Hexo: Getting Started - Setup for detail information.
Configuration
Modify site settings in _config.yml
1 |
|
Refer to Hexo: Getting Started - Configuration for detail information.
Commands
- init:
$ hexo init <folder>
- new:
$ hexo new [layout] <title>
- layout: using “draft” for imcomplete article
- generate:
$ hexo g
- publish:
$ hexo p
# publish a draft - server:
$ hexo s -p 4000
# start a local server for preview - deploy:
hexo d
# deploy web-site to pre-defined(_config.yml
) web-site - clean:
hexo clean
# clean the cache file
Refer to Hexo: Getting Started - Commands for detail information.
Customization
Rss
npm install hexo-generator-feed --save
change themes/XXX/_config.yml
rss: /atom.xml
Sitemap
npm install hexo-generator-sitmap --save