content:
The power of Hexo is that there are many plugins to extend the function, and the Hexo support directory is also very simple.
Install
First, install a hexo-toc plugin, the code is as follows:
npm install hexo-toc --save
configure
Then, configure the site configuration file _config.yml:
toc:
maxdepth: 3
class: toc
slugify: transliteration
decodeEntities: false
anchor:
position: after
symbol: '#'
style: header-anchor
use
Add placeholders for TOC in Markdown articles:
<!-- toc -->
Effect
Please see this article.