@ericytt/hexo-toc
v2.0.0
Published
Insert a markdown TOC(Table Of Content) before posts be rendered.
Readme
hexo-toc
Insert a markdown TOC(Table Of Content) before posts be rendered.
Inject a TOC only when a placeholder(<!-- toc -->) found in the raw markdown files. And the TOC will be injected after the placeholder.
All you need to do is placing a placeholder(<!-- toc -->) in your post when and where needed.
Install
npm install hexo-toc --saveOptions
All the options of markdown-toc,
slugify function, and heading anchor options can be specified as follow in your _config.yml:
toc:
maxdepth: 3
class: toc
slugify: transliteration
decodeEntities: falsemaxdepth: Use headings whose depth is at most maxdepth.class: The CSS Class for the toc. (Default isfalse)slugify: Choose which slugify function you want to use. Currently support uslug (Default) and transliteration.decodeEntities: Select whether to enable decode entities. ( Default isfalseand please see #15).
