Last updated June 23, 2026

Frontmatter Reference

3 minutes read

Every .mdx file in your content directory can declare frontmatter between --- delimiters. folio.md validates every field at build time and throws a descriptive error if the value is wrong.

mdx
---
title: My Page
description: A short description for search and meta tags.
---

Fields

title

Typestring
Requiredyes

The page title. Rendered as the <h1> at the top of the page when showTitle is true, used in the <title> tag as {title} | {site name}, and included in og:title and search results.

mdx
---
title: Getting Started
---

description

Typestring
Defaultsite-level description from folio.config.ts

A short summary of the page. Used in <meta name="description">, og:description, and the search index. Falls back to the site-level description when omitted.

mdx
---
title: Getting Started
description: Install folio.md and publish your first docs site.
---

icon

TypeIconName
Defaultnone

A Lucide icon shown in the sidebar. Only visible for top-level pages and top-level _section.mdx files. Setting icon on a page nested inside a section passes schema validation but has no visible effect, and folio.md emits a build warning.

See the Icon Reference for all accepted names.

mdx
---
title: Getting Started
icon: Rocket
---

showTitle

Typeboolean
Defaulttrue

When false, folio.md suppresses the auto-rendered <h1> at the top of the page. Use this when you want to write your own title markup inside the MDX body, or on landing pages where the heading is part of a custom layout.

mdx
---
title: Home
showTitle: false
---

author

Typestring
Defaultnone

The page author’s name. Displayed below the page title alongside the reading time, separated by a dot. Also sets <meta name="author"> and appears in JSON-LD Article structured data.

mdx
---
title: Deep Dive into Caching
author: Alice
---

keywords

Typestring[]
Defaultnone

A list of keywords added to <meta name="keywords">. Not a strong ranking signal for modern search engines, but useful for internal tooling or site-search tuning.

mdx
---
title: Caching
keywords: [cache, CDN, performance]
---

noIndex

Typeboolean
Defaultfalse

When true, sets <meta name="robots" content="noindex, nofollow"> and excludes the page from the sitemap and Atom feed. Use this for draft pages, internal-only content, or redirect stubs you don’t want indexed.

mdx
---
title: Draft: New Feature
noIndex: true
---

alias

Typestring
Defaultnone

Turns the page into a redirect stub. Visiting this page’s URL sends the browser to the alias value as a static server-side redirect, with no JavaScript involved. The value must be an internal path. folio.md rejects external URLs at build time.

folio.md excludes redirect stubs from the sidebar, search, and prev/next pagination. The stub file itself never renders as a page.

mdx
---
title: Old Page Title
alias: /guide/new-page-title
---

::: note If another page links to a redirect stub instead of its destination, folio.md emits an ALIAS warning at build time. Update those links to point to the destination directly. :::

::: warning If the alias file contains body content below the frontmatter, that content is silently discarded. The page is never rendered. folio.md emits an ALIAS [non-empty] warning at build time to catch this. :::