diff --git a/docs/extensions/index.md b/docs/extensions/index.md index a9d58b3..0edbe05 100644 --- a/docs/extensions/index.md +++ b/docs/extensions/index.md @@ -1021,9 +1021,26 @@ $tocExtension = new TableOfContentsExtension( cssClass: 'toc', // CSS class for nav element position: 'top', // 'top', 'bottom', or null for manual placement separator: '
', // Optional HTML between TOC and content + collapsible: true, // Wrap in a
/ disclosure + summary: 'Contents', // Disclosure label (default 'Table of Contents') + open: false, // Start expanded when true (default collapsed) ); ``` +**Collapsible:** with `collapsible: true` the TOC is wrapped in a +`
`/`` disclosure (closed unless `open: true`), with the heading +list directly inside it: + +```html +
+Table of Contents +
    ...
+
+``` + +When `collapsible` is off (the default) the output is the unchanged +`