Skip to main content

Table of contents

When a document has headings, the Contents section in the sidebar shows an outline of them.

How it is built

The outline includes every heading in the document, from level 1 through level 6, indented by level. If the document has YAML frontmatter with a title, that title appears as the top entry.

  • Click any entry to jump to that heading. If you are in the raw source view, clicking a contents entry switches to the rendered view and scrolls to the heading.
  • As you scroll the rendered document, the entry for the section you are reading is highlighted and shown in bold, so you always know where you are.

The scroll highlight follows the rendered pane, so it works in the rendered view and in side-by-side. In the raw source view the outline is still clickable, but the highlight does not follow your position.