Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR-26023: MyST-Aligned Frontmatter Standard


title: MyST-Aligned Frontmatter Standard date: 2026-02-08 tags:


ADR-26023: MyST-Aligned Frontmatter Standard

Date

2026-02-08

Status

accepted

Supersedes: ADR-26018, ADR-26019

Context

ADR-26018 mandated universal YAML frontmatter with four fields: owner, version, birth, and last_modified. These names were chosen for human clarity but do not match the MyST frontmatter API. As a result, the MyST static site renderer (myst build --html) silently ignores them — they never appear on the published documentation site.

ADR-26019 proposed a workaround: a reflection block script (sync_metadata.py) that would project YAML metadata into the document body as visible Markdown. This added automation complexity (pre-commit hooks, positional parsing, Jupytext sync) to solve a problem that MyST already solves natively — if the correct field names are used.

Key Finding

MyST renders the following frontmatter fields natively with the default book-theme:

FieldFormatRendered on Site?Notes
titlestringYesPage title
authorstringYesFull string rendered (including email if present)
authorsarray of objectsPartiallyOnly name renders; email is not displayed
dateISO 8601 stringYesRendered on the page
options.*dictNoCustom fields — invisible to default MyST theme

By renaming owner to author and last_modified to date, MyST renders ownership and freshness information without any custom scripts, templates, or reflection blocks.

Two-Block Jupytext Structure

When editing in JupyterLab (the primary editing environment), the frontmatter lives in the first markdown cell of the .ipynb file. On jupytext --sync, the .md file receives two YAML blocks:

.ipynb.mdPurpose
Notebook-level metadata (invisible in JupyterLab)Block 1 — first --- block (jupytext:, kernelspec:)Jupytext sync config
First markdown cellBlock 2 — second --- block (title:, author:, date:, etc.)Content frontmatter

This two-block structure is necessary. Merging them into a single .md block causes metadata loss in the .ipynb file because the .md takes priority during sync. The .ipynb editing workflow is primary — two blocks must remain.

Decision

We adopt MyST-native field names for all content article frontmatter. This supersedes the field naming in ADR-26018 and eliminates the need for reflection block scripts proposed in ADR-26019.

1. Canonical Frontmatter Schema

FieldLocationRendered by MyST?Notes
titletop-levelYesDocument title
author / authorstop-levelYesAuthor’s choice of format
datetop-levelYesSemantically = last modified date
versionoptions.versionNoFor RAG/tooling; future custom template
birthoptions.birthNoFor RAG/tooling; future custom template

Both author (string) and authors (array of objects) are valid MyST formats. Individual document authors choose which they prefer.

2. Example: author as String


title: Article Title
author: Vadim Rudakov, rudakow.wadim@gmail.com
date: 2026-02-08
options:
  version: "0.1.0"
  birth: 2026-01-03
  token_size: 1688
  type: adr
---

3. Example: authors as Array


title: Article Title
authors:
- name: Vadim Rudakov
  email: rudakow.wadim@gmail.com
date: 2026-02-08
options:
  version: "0.1.0"
  birth: 2026-01-03
  type: adr
---

4. Reflection Block Scripts Eliminated (Content Articles)

MyST renders author and date natively. The sync_metadata.py pre-commit hook proposed in ADR-26019 is no longer needed for content articles. The reflection block pattern (first cell after H1 title) is retired.

5. ADR Scope Exclusion

ADRs retain their own format defined by ADR-26016 and ADR-26017. ADR body/YAML synchronization (Status, Date sections matching YAML fields) remains a separate concern.

6. Migration Strategy

Lazy migration — files are updated to the new schema as they are touched. No big-bang migration required.

Consequences

Positive

Negative / Risks

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Claude (AI Engineering Advisor)