Hexo Quick Guide
Official Site: https://hexo.io/
Version: 6.3.0
Workflow
With Git deployment
$ hexo new "My New Article"
# Edit source/_posts/My-New-Article.md
$ hexo clean
$ hexo generate
$ git add -A
$ git commit -m <msg>
$ git push
Maintenance
Update outdated npm packages:
Using npm: With npm-check-updates
. Run the following commands under the blog directory (./
).
$ ncu -u
$ npm install
Configuration
Site config is stored in ./_config.yml
Theme
Configuration
Alternation Priority (From high to low):
theme_config
in site’s primary configuration file_config.[theme].yml
file_config.yml
file under the theme directory
NexT
GitHub
Documentation
Version: 8.15.0
Configuration
NexT theme config is stored in ./_config.next.yml
& node_modules/hexo-theme-next/_config.yml
Code Highlight Theme
Legacy Repositories
Usage
Tag Plugins
Referencing images or other assets using normal markdown syntax and relative paths may lead to incorrect display on archive or index pages. Plugins have been created by the community to address this issue in Hexo 2.
Include Code
{% include_code [title] [lang:language] [from:line] [to:line] path/to/file %}
Include Posts
{% post_link filename [title] [escape] %}
Include Assets
{% asset_path filename %}
{% asset_img [class names] slug [width] [height] [title text [alt text]] %}
{% asset_link filename [title] [escape] %}