Closed matthew-carroll closed 3 months ago
Publish table-of-contents data with every Markdown page.
The Markdown plugin adds root level data to the Page data structure with the key "tableOfContents".
Page
Example of "tableOfContents" data, accessible from templates:
"tableOfContents": { "items": [{ "title": "...", "sectionId": "...", "level": 0, }], "isEmpty": false, "isEmptyBeyondLevel": (level) => {}, "hasMultipleBeyondLevel": (level) => {}, "linkCountBeyondLevel": (level) => {}, "renderHtmlList": ({startingLevel}) => {}, }
Publish table-of-contents data with every Markdown page.
The Markdown plugin adds root level data to the
Page
data structure with the key "tableOfContents".Example of "tableOfContents" data, accessible from templates: