Licence
MIT
Version
2.0.0
Deps
1
Size
9 kB
Vulns
0
Weekly
99
hexo-auto-toc
Automatically generates a responsive table of contents that fixes to the side of the article page or above the articles, depending on the user's device. It can also automatically choose to be on the left or on the right.
- Getting Started
- Installation
npm install hexo-auto-tocRequirement cheerio:auto install it replacing npm install cheerio --save
- The plugin will automatically parse all content and generate a table of contents.
If your article page structure does not wrap the content inside an
<article>element, contents in<body>will be parsed. Or you can add<article>manually — typically in theindex.htmlfile under yourblogfolder, but this is not necessary. - check the effects:
hexo clean&&hexo g&&hexo s
- 使用
- 安装(自动安装依赖cheerio)
npm install hexo-auto-toc- 插件会自动对网页包含内容进行解析,自动生成目录。如果你的文章页面结构中内容没被
<article>包裹,将会解析<body>下的所有内容;你可以自行添加<article>(即blog文件夹下的index.html),但不是必须的。 - 查看效果
hexo clean&&hexo g&&hexo s
- Example

Recommendations
- hexo-everyday-calendar:This is a practical calendar plugin for hexo bloggers, like contribution statistics on GitHub.