Frontmatter Reference
Every documentation page in this theme uses frontmatter to define metadata and control how the page is displayed. Here’s a complete reference of all available frontmatter options.
Required Fields
---title: "Page Title"---
title
- Type:
string
The title of the page. This appears at the top of the page and in the navigation.
Optional Fields
---description: A brief description of the page contentsidebar: label: Custom Label order: 1 badge: text: Updated variant: notetableOfContents: minHeadingLevel: 2 maxHeadingLevel: 3pagefind: truedraft: true---
description
- Type:
string
A brief description of the page content. This is used for SEO purposes and should concisely summarize what users will find on the page.
sidebar
- Type:
object
Controls how the page appears in the sidebar navigation.
Properties:
label
(string
, optional): Custom label for the sidebar. If not provided, the page title is used.order
(number
, optional): Controls the order of pages within their section. Lower numbers appear first. Pages without an order value are sorted alphabetically.badge
(object
, optional): Displays a badge next to the page title in the sidebar.text
(string
): The text to display in the badgevariant
("note" | "tip" | "caution" | "danger" | "info"
): The style variant of the badge
Example with badge:
sidebar: label: "API Guide" order: 2 badge: text: "New" variant: "info"
tableOfContents
- Type:
object
- Default:
{ minHeadingLevel: 2, maxHeadingLevel: 3 }
Controls which headings appear in the table of contents.
Properties:
minHeadingLevel
(number
, optional): The minimum heading level to include (h1-h6). Defaults to 2.maxHeadingLevel
(number
, optional): The maximum heading level to include (h1-h6). Defaults to 3.
pagefind
- Type:
boolean
- Default:
true
Controls whether the page content should be indexed by Pagefind for search functionality. Set to false
to exclude the page from search results.
draft
- Type:
boolean
- Default:
false
When set to true
, the page will not be published in production. This is useful for work-in-progress content.
Example Configuration
---title: My Documentation Pagedescription: A comprehensive guide to using our product's APIsidebar: label: API Guide order: 2tableOfContents: minHeadingLevel: 2 maxHeadingLevel: 4pagefind: falsedraft: false---