layout | title | nav_exclude | search_exclude |
---|---|---|---|
default |
Table of contents usage |
true |
true |
To include new dynamic TOC in a page, add this snippet under the page title.
<details id="toc" open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>
There are some CSS classes, which can be added to the details tag.
Using the class will leave only the top-level links in TOC.
Usage:
<details id="toc" class="top-level" open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>
Using the class will number all links in TOC, while respecting the levels.
Usage:
<details id="toc" class="numbered" open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>