Skip to main content

Frontmatter reference

Frontmatter is not decoration. It drives the sidebar, the search index, the difficulty badges, the review cadence and maintainer routing. The schema is defined in content.config.json and validated by pnpm content:validate.

A complete example

---
id: interactive-rebase
title: Interactive rebase
sidebar_label: Interactive rebase
sidebar_position: 40
description: Reorder, squash, edit and drop commits using the interactive rebase todo list.
keywords:
- rebase
- interactive
- squash
tags:
- walkthrough
- rebasing
- individual
module: 05-history-and-rewriting
level: advanced
duration: 35
status: published
last_reviewed: 2026-07-22
maintainers:
- nabin747
prerequisites:
- rebase-basics
- commit-anatomy
git_version: "2.38"
---

Required fields

FieldTypeConstraintWhat breaks without it
idstringkebab-case, no ordering prefixCross-references cannot resolve the document
titlestring4–70 chars, sentence case, no trailing periodThe H1 and every link title
descriptionstring60–170 chars, one sentenceSearch snippets and social previews fall back to the first paragraph
moduleenummust match the containing directoryAggregate views silently omit the document
levelenumfoundational · intermediate · advanced · expertDifficulty filtering and the badge
durationinteger0–180 minutesTime estimates in <LessonMeta> and module totals
statusenumsee belowDraft content leaks into published navigation
last_revieweddateYYYY-MM-DD, not in the futureThe staleness audit cannot run
maintainersarray≥1 GitHub handle, no @Nobody is routed the review
FieldTypeNotes
sidebar_labelstring≤32 characters. Set it whenever title would wrap in the sidebar
keywordsarray1–10 terms; feeds the local search index
tagsarray≤6, drawn from the closed taxonomy below

Optional fields

sidebar_position, slug, prerequisites, git_version, hide_table_of_contents, hide_title, pagination_prev, pagination_next, image, unlisted, draft, toc_min_heading_level, toc_max_heading_level.

Forbidden fields

sidebar, author, date.

Authorship is Git history, not metadata — a document with five contributors and one author field is actively misleading. date duplicates showLastUpdateTime, which is derived from commits and therefore cannot drift.

Status values

StatusMeaningAppears in navigation
scaffoldedFile exists, no content yetYes, visibly empty
draftBeing writtenYes
in-reviewOpen pull requestYes
publishedReviewed and verifiedYes
needs-updateKnown to be stale or wrongYes, with a banner
deprecatedSuperseded; kept for its URLYes, with a redirect notice

Tag taxonomy

The vocabulary is closed. An unknown tag fails validation. Adding one is a deliberate change to content.config.json, reviewed on its own merits — this is what stops a tag list from degenerating into four hundred synonyms.

Content typemodule-overview, concept, walkthrough, exercise, lab, cheatsheet, reference, glossary-entry, troubleshooting, decision-guide, landing

Topicsetup, configuration, objects, refs, index, commits, branches, merging, rebasing, remotes, tags, stashing, hooks, submodules, worktrees, large-repos, security, signing, ci, recovery, performance

Audienceindividual, team, maintainer, platform-engineer

The YAML dialect

The parser in scripts/lib/frontmatter.mjs accepts a deliberately narrow subset: scalars, ISO dates, quoted strings, inline arrays and block arrays.

Anchors, block scalars (|, >), inline maps and multi-line flow scalars are rejected. That is intentional: they make frontmatter hard to diff and review, and nothing here needs them.