Vaulthalla Logo

Table of Contents

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

1:::toc {title="On this page" depth="3" theme="compact"}2:::

Attributes

  • title: visible TOC title and aria label
  • 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>

:::toc links to the same IDs, so heading anchors and TOC entries stay aligned.

Themes

Built-in TOC themes:

  • default
  • compact
  • sidebar