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

KeyRules
gramr.publishpublic or unlisted. Absent: the note is not published, even if site is set. Any other value is an error.
gramr.siteA site name or a list of site names. Required when publish is set. An unknown site name is a warning.
gramr.sectionFolders separated by /, e.g. articles/rust. Surrounding / are ignored; empty parts, . and .. are errors. Defaults to the site's default_section.
gramr.tokenRequired 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

KeyWhat gramr does
gramrRemoved from the page.
titleRead to name the page. Added from the file name (not slugified) when missing: Comprendre les lifetimes.md gets title: Comprendre les lifetimes.
slugRead to name the page, used as is. No /, must not start with .. Rejected on unlisted pages.
path, urlRejected on unlisted pages.
hidden, include_in_feeds, in_search_indexOverwritten on unlisted pages.
anything elsePassed 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:

  1. the note's slug, as is;
  2. else its title, slugified (Understanding lifetimes → understanding-lifetimes);
  3. else its file name, slugified.

For unlisted pages, the slug is the token.