Front matter
The metadata at the top of a content file — title, dates, draft status, weight, URLs, menus, parameters — in YAML, TOML or JSON.
Front matter is metadata at the top of a content file. Write it in YAML between ---, TOML between +++, or JSON as an object:
+++
title = "Hello, fugo"
date = 2026-10-02T09:00:00Z
draft = false
tags = ["intro", "rust"]
[params]
author = "Ada"
+++---
date: 2026-10-02T09:00:00Z
draft: false
params:
author: Ada
tags:
- intro
- rust
title: Hello, fugo
---{
"date": "2026-10-02T09:00:00Z",
"draft": false,
"params": {
"author": "Ada"
},
"tags": [
"intro",
"rust"
],
"title": "Hello, fugo"
}Templates read the fields: page.title, page.date, page.params.author. A key fugo does not know is a parameter: author: Ada at the top level is page.params.author too. Parameter keys are lower case in templates.
Fields#
aliases- URLs that redirect to the page, e.g.
["/old-url/"]. See URLs. build- Build options: whether the page is rendered, listed, and its resources published.
cascade- Front matter that the page’s descendants inherit. See Cascade.
date- The date of the page, e.g.
2026-10-02or2026-10-02T09:00:00+07:00. description- A description, for the
<meta name="description">of the page and for listings. drafttrueleaves the page out unless the build uses--build-drafts(-D).expiryDate- After this date the page is left out unless the build uses
--build-expired(-E). keywords- A list of keywords.
lastmod- The date of the last change.
layout- A layout name:
layout: wideuseswide.htmlinstead ofsingle.html. linkTitle- A shorter title for links and menus (
page.link_title). markup- The content format,
md(Markdown) orhtml, when the file extension does not say. menus- Adds the page to menus:
menus: main, or a map withweight,parent,name,identifier. outputs- The output formats of the page, e.g.
[html, json]. params- Parameters, read as
page.params.<key>. publishDate- Before this date the page is left out unless the build uses
--build-future(-F). resources- Metadata for page resources: names, titles and parameters by file pattern.
sitemap- The page’s sitemap settings:
changeFreq,priority,disable. slug- The last segment of the URL, replacing the file name.
summary- The page’s summary, instead of the automatic one.
title- The title.
translationKey- Links translations that have different file names.
type- The content type, used to look up templates instead of the section.
url- The whole URL path of the page, e.g.
/about-us/. weight- The position in lists: lower weights first. Pages without a weight come after those with one.
Dates#
date, lastmod, publishDate and expiryDate take a date (2026-10-02), a date and time (2026-10-02T09:00:00), with a zone (…+07:00 or …Z), or Unix seconds. A date without a zone is in the site’s timeZone, else UTC. Templates format dates with the date filter:
{{ page.date | date(format="%B %-d, %Y") }}Where each date comes from is configurable: lastmod can fall back to the date, a date can be taken from the file name (2026-10-02-my-post.md). See Front matter configuration.
Cascade#
cascade sets front matter on a page’s descendants. In a section’s _index.md:
+++
title = "Documentation"
[cascade]
[cascade.params]
show_toc = true
[cascade.target]
kind = "page"
+++---
cascade:
params:
show_toc: true
target:
kind: page
title: Documentation
---{
"cascade": {
"params": {
"show_toc": true
},
"target": {
"kind": "page"
}
},
"title": "Documentation"
}Every regular page below /docs/ gets page.params.show_toc. A page’s own front matter wins over a cascade. target restricts the cascade by kind, path (a glob like /docs/api/**), lang and environment; a list of tables gives several cascades.
Summary divider and content#
Everything after the front matter is the content. <!- marks the end of the summary.