Frontmatter Reference

Introduction

Both .md (markdown) and .ree (template) files can include YAML frontmatter - a block of metadata at the top of the file, delimited by --- lines. Frontmatter is parsed by parse_frontmatter() in lib/static_site.ts using Bun's built-in YAML parser.

---
title: "My Document"
layout: "docs"
has_sidebar: true
---

Global Fields

These fields apply to both .md and .ree files:

FieldTypeDefaultDescription
titlestring-Page title. Used in <title>, sidebar navigation, and as the heading if no # Heading exists in markdown content
layoutstring"layout"Layout template name. The engine tries {name}.layout.ree first, then {name}.ree

Markdown-Only Fields

These fields are specific to .md files and are consumed at different stages of the SSG pipeline.

Sitemap & SEO

FieldTypeDefaultDescription
sitemapbooleantrueSet to false to exclude this page from the generated sitemap.xml. Also implied by noindex: true
noindexbooleanfalseSet to true to exclude this page from the sitemap. Use alongside <meta name="robots" content="noindex"> in the layout
localizebooleantrueSet to false for pages whose content is identical in every language - the sitemap emits only the default-language URL, with no per-language entries or hreflang alternates
lastmoddate stringsee belowOverride the lastmod date in the sitemap. Format: YYYY-MM-DD. When not set, the sitemap falls back to published_at/date, then to the file's modification time
FieldTypeDefaultDescription
has_sidebarbooleanfalseEnable sidebar navigation for this section. Set on the section's index.md file. Also accepts "true" and "yes" (string values from YAML parsing). All .md files in the same folder become sidebar entries
skip-navigationbooleanfalseExclude this page from the sidebar navigation. Useful for utility pages that shouldn't appear in the sidebar menu

RSS Feed

FieldTypeDefaultDescription
rssbooleantrueSet to false to exclude this post from the RSS/JSON feed
published_atdate stringfile mtimePublication date for RSS. Format: YYYY-MM-DD or full ISO datetime
datedate stringfile mtimeAlias for published_at
descriptiontextfirst paragraphPost description/summary for the RSS feed. Falls back to the first paragraph of content if not set
summarytextfirst paragraphAlias for description
abstracttextfirst paragraphAlias for description (academic layout)
authorstring or object-Author name or {name, email} object
authorsarray-Array of author objects [{name, email, url}]. First entry is used for RSS <author>, all entries appear in JSON Feed

Rendering

FieldTypeDefaultDescription
site_namestring"Static Site"Override the site name for this specific page

Frontmatter Resolution

Language-Variant Frontmatter

For language-specific markdown files (file.en.md, file.sl.md), frontmatter from the resolved variant is used. When checking for sitemap inclusion, noindex: true or sitemap: false on any language variant excludes the canonical page from the sitemap entirely.

The resolution order:

  1. {name}.{lang}.md - exact match for the active language
  2. {name}.{default_language}.md - fallback to the default language
  3. {name}.md - generic fallback

Frontmatter Merging

When the SSG script scans language variants, frontmatter values are merged:

  • Scalar values (strings, numbers, booleans) from the most specific variant win
  • sitemap: false and noindex: true on any variant cause exclusion
  • lastmod resolves to the explicit lastmod, then published_at/date, then the most recent mtime across all variants

Examples

Basic Page

---
title: "Installation Guide"
layout: "academic"
---

Blog Post with RSS Metadata

---
title: "Introducing ReeWeb 0.1"
date: 2026-05-12
author: "Matic Jurglic"
description: "The first public release of ReeWeb, a new static site generator."
tags:
    - release
    - announcement
---

Multi-Author Post

---
title: "Building with ReeWeb"
published_at: 2026-06-01
authors:
    - name: "Matic Jurglic"
      email: "matic@reepolee.com"
    - name: "Evan"
      url: "https://example.com"
---

Page Excluded from Everything

---
title: "Draft Notes"
sitemap: false
rss: false
skip-navigation: true
---

Section with Sidebar

On the section's index.md:

---
title: "Documentation"
has_sidebar: true
---

All *.md files in the same directory automatically become sidebar entries, ordered by filename.