Automatically add numbered index for the headings in hexo post.
Assume the post is:
# Top heading
## Sub heading
## Another sub heading
# Another top heading
Then it will be rendered as:
1 Top heading
1.1 Sub heading
1.2 Another sub heading
2 Another top heading
- Run following command in your blog directory.
npm install hexo-heading-numbering --save
- Add following content in
_config.yml
(under blog root directory).
heading_numbering:
enable: true
separator: "."
prefix: ""
suffix: " "
- Clean and rebuild.
hexo cl && hexo g
Hexo v5.x (Tested on v5.4.0)
MIT