gramr reads YAML front matter, between two --- lines at the very top of the note. For how to use it, see Writing notes.
---
gramr:
publish: public # public | unlisted, absent = not published
site: blog # or a list: [blog, docs]
section: articles/rust # optional, defaults to the site's default_section
# token: r3jrg5kmwelyqn6qgxeb # required for unlisted pages
title: Understanding lifetimes
date: 2026-10-30
---The gramr block
| Key | Rules |
|---|---|
gramr.publish | public or unlisted. Absent: the note is not published, even if site is set. Any other value is an error. |
gramr.site | A site name or a list of site names. Required when publish is set. An unknown site name is a warning. |
gramr.section | Folders separated by /, e.g. articles/rust. Surrounding / are ignored; empty parts, . and .. are errors. Defaults to the site's default_section. |
gramr.token | Required for unlisted pages, ignored on public ones. At least 16 characters among a-z and 0-9. See Unlisted pages. |
Unknown keys under gramr are errors. An invalid gramr block is an error even when it targets another site.
Other keys
| Key | What gramr does |
|---|---|
gramr | Removed from the page. |
title | Read to name the page. Added from the file name (not slugified) when missing: Comprendre les lifetimes.md gets title: Comprendre les lifetimes. |
slug | Read to name the page, used as is. No /, must not start with .. Rejected on unlisted pages. |
path, url | Rejected on unlisted pages. |
hidden, include_in_feeds, in_search_index | Overwritten on unlisted pages. |
| anything else | Passed to the generator untouched (date, taxonomies, extra…). |
The front matter is rewritten, so its comments and formatting are not kept.
Page file name
The page is written to <content.dir>/<section>/<slug>.md. The slug is:
- the note's
slug, as is; - else its
title, slugified (Understanding lifetimes→understanding-lifetimes); - else its file name, slugified.
For unlisted pages, the slug is the token.