dpt
docsify-plugin-toc
npm i docsify-plugin-toc
dpt

docsify-plugin-toc

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

by Justin Tien (Yi-Ming Tien)

1.3.1 (see all)License:MITTypeScript:Not Found
npm i docsify-plugin-toc
Readme

docsify-plugin-toc

page's ToC for docsify.

npm

homepage

Usage

  1. Configure docsify-plugin-toc:

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

    <!-- head -->
    <link rel="stylesheet" href="https://unpkg.com/docsify-plugin-toc@1.3.1/dist/light.css">
    <!-- Also insert you custom css -->
    
    <!-- body -->
    <script src="https://unpkg.com/docsify-plugin-toc@1.3.1/dist/docsify-plugin-toc.min.js"></script>
    

Options

ArgumentTypeDescription
tocMaxLevelnumberThe maximum depth of the headings printed on the ToC. If you set tocMaxLevel to 3, I recommend you to set subMaxLevel to 2 avoid ToC duplication.
targetstringThe target heading printed on the ToC. It's used as an argument to query DOM with querySelectorAll()

Downloads/wk

872

GitHub Stars

31

LAST COMMIT

6mos ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

3

OPEN PRs

0
VersionTagPublished
1.3.1
latest
6mos ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate