Get started →

Frontmatter Fields

ciderpress pages support standard Rspress frontmatter fields. Frontmatter is defined in YAML at the top of markdown files or injected via the defaults field on a Page / Workspace (renamed from the legacy frontmatter field — same type, different name).

---
title: My Page
description: A short summary of this page.
---

# My Page

See the Content concept for injection and inheritance patterns.

Standard fields

FieldTypeDefaultDescription
titlestringPage title (used in sidebar, browser tab, SEO)
titleTemplatestring | booleanTitle template override (%s is page title)
descriptionstringMeta description for SEO and card previews
layoutstring'doc'Page layout mode — 'doc' / 'page' / 'home' ship out of the box (see Layout values)
sidebarbooleantrueShow or hide the sidebar
asideboolean | 'left'trueTable of contents position
outlinefalse | number | [min, max] | 'deep'Outline heading depth
navbarbooleantrueShow or hide the top navigation bar
editLinkbooleantrueShow or hide the "Edit this page" link
lastUpdatedbooleantrueShow or hide the last updated timestamp
footerbooleantrueShow or hide the page footer
pageClassstringCustom CSS class added to the page container
head[string, Record<string, string>][]Extra elements injected into <head> (see below)
badgestring | BadgeConfig | arrayAd-hoc page badge(s) shown in the sidebar and breadcrumb (see Badges)
statusstring | string[]Named status id(s) from the registry (see Badges)

Layout values

ValueDescription
'doc'Standard documentation layout with sidebar and table of contents
'page'Full-width page with no sidebar or table of contents
'home'Home page layout with hero section and feature cards

Outline values

ValueDescription
falseDisable the outline entirely
numberShow headings up to this depth (e.g. 3 for h1–h3)
[min, max]Show headings within a depth range (e.g. [2, 4])
'deep'Show all heading levels

Aside values

ValueDescription
trueShow table of contents on the right (default)
'left'Show table of contents on the left
falseHide the table of contents

Head format

The head field accepts an array of tuples. Each tuple is [tagName, attributes]:

head:
  - - meta
    - name: og:title
      content: My Page
  - - link
    - rel: canonical
      href: https://example.com/my-page

Equivalent injected via Page.defaults in the config:

{
  title: 'Architecture',
  path: '/architecture',
  include: 'docs/architecture.md',
  defaults: {
    head: [
      ['meta', { name: 'og:title', content: 'My Page' }],
      ['link', { rel: 'canonical', href: 'https://example.com/my-page' }],
    ],
  },
}

Custom fields

The two surfaces have different rules:

  • YAML frontmatter in .md / .mdx source files — arbitrary keys are accepted and passed through to Rspress's page data object. Use these for metadata that theme components or plugins consume.
  • Config-side defaults — validated against a .strict() Zod schema. Only the fields documented above are accepted; unknown keys fail at config load time with a clear error.
---
title: API Routes
category: reference
difficulty: advanced
---

Custom fields are accessible in theme components via the page data object.