Front matter

Configure where page dates come from, and set front matter for many pages at once with cascade.

Dates#

[frontmatter] lists, for each date, where to look, in order:

config.toml
[frontmatter]
  date = ["date", "publishDate", "pubdate", "published", "lastmod", "modified"]
  lastmod = [":git", "lastmod", "modified", "date", "publishDate", "pubdate", "published"]
  publishDate = ["publishDate", "pubdate", "published", "date"]
  expiryDate = ["expiryDate", "unpublishdate"]

These are the defaults. A list you set replaces the default list; the first source that has a date wins.

A front matter field name
That field: date, published, or any other.
:filename
The date at the start of the file or bundle name: 2026-10-02-my-post.md gives the date and the slug my-post.
:fileModTime
The file’s modification time.
:git
The author date of the file’s last Git commit, with enableGitInfo. Without it, or for a file Git does not know, it gives no date and lastmod falls through to the next source.

:default in a list stands for the default list of that date.

Cascade#

cascade in the configuration sets front matter on every page it matches:

config.toml
[[cascade]]
  [cascade.params]
    banner = "images/docs-banner.jpg"
  [cascade.target]
    path = "/docs/**"
    kind = "page"

target selects pages by path (a glob), kind, lang and environment. A page’s own front matter wins over a cascade; a section’s cascade (in its _index.md) applies to the pages below it. See Front matter.

    Type to search titles, headings and text.