Skip to content

Generate TOC

Justin Forest edited this page Aug 5, 2024 · 1 revision

To embed a table of contents (TOC) in a wiki page, use the following syntax:

Some text.

__TOC__

Some more text.

When you run the script, it will replace the __TOC__ marker with a table of contents, like this:

Some text.

<!-- toc:start -->
<!-- some more comments -->

**Table of Contents:**

- [Section 1](#section-1)
- [Section 2](#section-2)

<!-- toc:end -->

Those new placeholders will be replaced with the actual TOC when the script is run next time.

Clone this wiki locally