Frontmatter reference
Every supported frontmatter field.
The schema lives in src/content.config.ts and is enforced at build time — invalid frontmatter fails the build.
Fields#
| Field | Type | Default | Description |
|---|---|---|---|
title | string | (required) | Shown as <h1> and in <title>. |
description | string | — | Subtitle on the page; used as <meta description>. |
sidebar.label | string | title | Label in the sidebar. |
sidebar.order | number | 999 | Sort key within a section; lower wins. |
sidebar.hidden | boolean | false | If true, the page is omitted from the sidebar (still routable). |
template | "doc" | "splash" | "doc" | Reserved for future use. |
Example#
---
title: Configuring the cache
description: TTLs, eviction, and observability.
sidebar:
label: Cache
order: 30
---
Validation errors#
Astro will fail the build with a path and message:
[InvalidContentEntryFrontmatterError]
guides/cache.md:
title: Required
Fix the frontmatter and re-run.