Frontmatter Fields

zpress pages support standard Rspress frontmatter fields. Frontmatter is defined in YAML at the top of markdown files or injected via the frontmatter field in config entries.

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

# My Page

See the Frontmatter guide 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
layout'doc' | 'page' | 'home''doc'Page layout mode
sidebarbooleantrueShow or hide the sidebar
asideboolean | 'left'trueTable of contents position
outlinefalse | number | [n, n]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[tag, attrs][]Extra elements injected into <head>

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 in config-injected frontmatter:

frontmatter: {
  head: [
    ['meta', { name: 'og:title', content: 'My Page' }],
    ['link', { rel: 'canonical', href: 'https://example.com/my-page' }],
  ],
}

Custom fields

Arbitrary extra fields are supported and passed through to the output. Use custom fields for metadata consumed by plugins or theme components:

---
title: API Routes
category: reference
difficulty: advanced
---

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