Table of Contents
The ToC shortcode filters page.rawInput of the page where it is used and creates a list of headings. It is fully compatible with IDs set by markdown-it-attrs.
Definition
| Argument | Type | Notes |
|---|---|---|
| className | string|undefined |
An optional space-separated list of CSS classes; default: "lfp-table-of-contents" |
Usage
Drop in the single shortcode:
{% toc "custom-class" %}
The raw HTML output includes an h2 heading element and a flat list of links:
The HTML output can be styled by either overwriting styles for the default lfp-table-of-contents class or by introducing a custom class by passing a value for className.