Skip to content

xdapp/docsify-plugin-toc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docsify-plugin-toc

page's ToC for docsify.

npm

Usage

  1. Configure docsify-plugin-toc:

    <script>
    window.$docsify = {
      toc: {
        tocMaxLevel: 5,
        target: 'h2, h3, h4, h5, h6'
      },
    }
    </script>
  2. Insert script into docsify document:

    修改版请自行编译,yarn run build 或 npm run build

    <script src="//unpkg.com/docsify-plugin-toc"></script>

Options

Argument Type Description
tocMaxLevel number The maximum depth of the headings printed on the ToC. If you set tocMaxLevel to 3, I recommand you to set subMaxLevel to 2 avoid ToC duplication.
target string The target heading printed on the ToC. It's used as an argument to query DOM with querySelectorAll()

About

page's ToC (Table of Content) for docsify.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 64.8%
  • CSS 35.2%