Skip to content

About

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.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

License: MIT Required Hexo version

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
  1. Installation
npm install hexo-auto-toc

Requirement cheerio:auto install it replacing npm install cheerio --save

  1. 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 the index.html file under your blog folder, but this is not necessary.
  2. check the effects: hexo clean&&hexo g&&hexo s
  • 使用
  1. 安装(自动安装依赖cheerio)
npm install hexo-auto-toc
  1. 插件会自动对网页包含内容进行解析,自动生成目录。如果你的文章页面结构中内容没被<article>包裹,将会解析<body>下的所有内容;你可以自行添加<article>(即blog文件夹下的index.html),但不是必须的。
  2. 查看效果 hexo clean&&hexo g&&hexo s
  • Example

Example

Recommendations

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

About

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.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages