Skip to content

Frontmatter Reference

Overview

Every MDX documentation page in Pathfinder uses YAML frontmatter to define metadata, sidebar behavior, and page-level settings. This reference documents every available frontmatter field, its type, default value, and usage.

Frontmatter is defined at the top of each MDX file between triple-dash delimiters:

---
title: "Page Title"
section: "main"
description: "A brief description of the page content."
sidebar:
  label: "Sidebar Label"
  order: 1
---

Required Fields

title

PropertyValue
Typestring
RequiredYes
Default

The page title displayed in the browser tab, at the top of the page, and used as the default sidebar label if no explicit label is set.

title: "Getting Started with Pathfinder"
section: "main"

Optional Fields

description

PropertyValue
Typestring
RequiredNo
Default""

A brief description of the page content. Used in meta tags for SEO and may be displayed in search results.

description: "Learn how to install and configure the Pathfinder documentation theme."

The sidebar field is an object that controls how the page appears in the sidebar navigation.

sidebar.label

PropertyValue
Typestring
RequiredNo
DefaultValue of title

The text displayed in the sidebar navigation. Use this to provide a shorter label than the full page title.

sidebar:
  label: "Setup"

sidebar.order

PropertyValue
Typenumber
RequiredNo
Default0

Controls the sort order of the page within its sidebar section. Lower numbers appear first. Pages with the same order value are sorted alphabetically by label.

sidebar:
  order: 3

sidebar.badge

PropertyValue
Typeobject
RequiredNo
Default

Displays a small badge next to the sidebar label. Useful for marking pages as “New”, “Updated”, “Beta”, etc.

sidebar:
  badge:
    text: "New"
    variant: "tip"

The variant property accepts: "default", "info", "tip", "caution", "danger".

tableOfContents

Controls the automatic table of contents generated for the page.

tableOfContents.minHeadingLevel

PropertyValue
Typenumber
RequiredNo
Default2

The minimum heading level to include in the table of contents. Set to 2 to start with ## H2 headings (excluding the page title).

tableOfContents.maxHeadingLevel

PropertyValue
Typenumber
RequiredNo
Default3

The maximum heading level to include. Set to 3 to include ## H2 and ### H3 headings but exclude deeper levels.

tableOfContents:
  minHeadingLevel: 2
  maxHeadingLevel: 4

pagefind

PropertyValue
Typeboolean
RequiredNo
Defaulttrue

Whether this page should be included in the Pagefind search index. Set to false to exclude a page from search results.

pagefind: false

draft

PropertyValue
Typeboolean
RequiredNo
Defaultfalse

When set to true, the page is excluded from the production build. Draft pages are still visible during development.

draft: true

mappingKey

PropertyValue
Typestring
RequiredNo
Default

A unique key used to link equivalent pages across different locales for i18n support. Pages with the same mappingKey are treated as translations of each other, enabling the language switcher to navigate between them.

mappingKey: "gs-intro"

Complete Frontmatter Fields Table

FieldTypeDefaultRequiredDescription
titlestringYesPage title
descriptionstring""NoSEO meta description
sidebar.labelstringtitleNoSidebar display text
sidebar.ordernumber0NoSort order in sidebar
sidebar.badge.textstringNoBadge label text
sidebar.badge.variantstring"default"NoBadge color variant
tableOfContents.minHeadingLevelnumber2NoMin heading level for TOC
tableOfContents.maxHeadingLevelnumber3NoMax heading level for TOC
pagefindbooleantrueNoInclude in search index
draftbooleanfalseNoExclude from production
mappingKeystringNoi18n page linking key

Example: Complete Frontmatter

Here is an example with all available fields:

---
title: "Advanced Configuration"
section: "main"
description: "Deep dive into advanced Pathfinder configuration options for power users."
sidebar:
  label: "Advanced Config"
  order: 5
  badge:
    text: "Updated"
    variant: "caution"
tableOfContents:
  minHeadingLevel: 2
  maxHeadingLevel: 4
pagefind: true
draft: false
mappingKey: "gs-advanced"
---

Notes

  • The title field is the only required field. All other fields have sensible defaults.
  • The sidebar.order field determines page ordering within a section. Use consistent numbering (e.g., increments of 1) to make reordering easier.
  • The mappingKey should be unique across all pages within a locale but identical across locales for the same conceptual page.
  • Setting draft: true during development lets you work on pages without publishing them. Remember to set it back to false when the page is ready.
퍼널해커

중소기업을 위한 AI 마케팅&세일즈 자동화 시스템을 설계하고 구축합니다. 웹사이트, SEO, 콘텐츠, 리드 수집까지 한번에.

상호명: 퍼널해커 대표자: ___ 사업자등록번호: ___-__-_____ 통신판매업 신고번호: 제____-서울___-____호 주소: ___ 이메일: ___@funnelhacker.co.kr 호스팅 서비스 제공자: Netlify, Inc.

Copyright 2026 퍼널해커. All Rights Reserved