page's ToC for docsify.
-
Configure docsify-plugin-toc:
<script> window.$docsify = { toc: { tocMaxLevel: 5, target: 'h2, h3, h4, h5, h6' }, } </script>
-
Insert script into docsify document:
<script src="//unpkg.com/docsify-plugin-toc"></script>
Argument | Type | Description |
---|---|---|
tocMaxLevel |
number |
The 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. |
target |
string |
The target heading printed on the ToC. It's used as an argument to query DOM with querySelectorAll() |