The TableOfContentsPlugin
generates a Table of Contents for each page in the Mosaic filesystem using the headings on the page.
Heading ranks are used to determine which page headings should be included in the Table of Contents:
Heading Element (markdown syntax) | Rank |
---|---|
h1 (#) | 1 |
h2 (##) | 2 |
h3 (###) | 3 |
h4 (####) | 4 |
h5 (#####) | 5 |
h6 (######) | 6 |
The plugin output is added to a tableOfContents
metadata property of a page.
This plugin runs with no special priority.
Property | Description |
---|---|
minRank | The minimum page heading rank |
maxRank | The maximum page heading rank |
This plugin is included in the mosaic config shipped by the Mosaic standard generator. So if you use the below import in your mosaic.config.mjs
file then the plugin is included already:
To add it yourself, add the following to the plugins
collection: