Vaulthalla Logo

Table Of Contents

Generate a table of contents from headings in the current Markdown document.

Table Of Contents

Use :::toc to render a table of contents from headings in the current Markdown document.

1:::toc[On this page]{2  depth="3"3  theme="compact"4}5:::

Attributes

  • [Label]: visible TOC title and aria label, preferred for new Markdown
  • title: visible TOC title retained for existing Markdown
  • depth: maximum heading depth from 1 to 6
  • theme: TOC theme name

Defaults:

  • title="On this page"
  • depth="3"
  • theme="default"

Invalid depth values fall back to 3 and produce a non-fatal diagnostic where diagnostics are available.

Heading Anchors

The renderer gives headings stable IDs:

1## Install2 3## Install

Conceptual output:

1<h2 id="install">Install</h2>2<h2 id="install-1">Install</h2>