Getting started
Frontmatter, TOC, and labels
Control the right-hand docs aside with YAML frontmatter.
The right-hand menu on a docs page is not a separate CMS object. It is derived from this file: headings become the table of contents, and YAML fields become categories and tags.
What the aside shows
Three blocks can appear. Each is optional.
Table of contents
Headings from ## downward are collected after Markdown is rendered. IDs are added to those headings so the links jump on the same page.
toc: false hides the list. toc_depth: 2 keeps only ## headings.
Categories
Use category for one value or categories for a list. These describe the kind of document: Guides, References, Runbooks.
Tags
tags are free-form labels for search and grouping: frontmatter, mx, file-types.
Frontmatter contract
---
title: Frontmatter, TOC, and labels
description: Control the right-hand docs aside with YAML frontmatter.
section: Getting started
visibility: public
categories:
- Guides
- Content model
tags:
- frontmatter
- toc
toc: true
toc_depth: 3
sidebar:
toc: true
tags: true
categories: true
---
section still drives the left navigation group. Categories and tags drive the right aside and the filters on /docs.
Hide a block
Turn pieces off without deleting the labels:
toc: false
sidebar:
tags: false
categories: true
A page with no headings and empty tags renders without a right column.
Writing headings
Keep one title in frontmatter. The first # in the body is stripped when it matches that title. Use ## and ### for everything the TOC should list.
Related
- Content pipeline: Nunjucks then remark
- Private pages still require a session even when they define tags