Front Matter
Use episode front matter to describe both the teaching flow and the navigation model.
Required episode fields
title: the page title shown in navigation and episode headersweight: numeric order in the lessonquestions: list of learner-facing questions rendered near the top, with inline Markdown and math supportobjectives: list of learning goals rendered near the top, with inline Markdown and math supportkeypoints: list of recap points rendered near the bottom, with inline Markdown and math support
Optional episode fields
teaching: teaching time in minutesexercises: exercise time in minutessummary: override for episode card summariesdraft: hide unfinished content from production builds[tabs] sync = false: disable synced Hextra tabs on a page
Homepage metadata
The lesson homepage usually lives in content/_index.md and keeps layout = "hextra-home".
That page can hold the homepage content blocks in Components.
Shared lesson metadata such as params.lesson.title, params.lesson.tagline, and
params.lesson.description belongs in hugo.toml, and lesson/meta can reuse those values
inside Markdown body content when you want homepage copy to stay aligned with the config.
If you want an authors block on the homepage, add a root-level AUTHORS file. The lesson/authors
shortcode reads that file directly and renders the contributors there.
Example episode front matter
+++
title = "Using challenge and solution blocks"
weight = 20
teaching = 15
exercises = 10
questions = ["How should active-learning blocks behave in a Hugo-based lesson?"]
objectives = ["Use challenge, hint, and solution shortcodes naturally."]
keypoints = ["Hints and solutions should stay collapsible."]
+++Math in TOML front matter
If you use TOML front matter, prefer literal strings for LaTeX so backslashes are not treated as TOML escapes:
objectives = [
'Explain the \(t\bar{t}\gamma\) workflow.'
]Double-quoted TOML strings also work, but every backslash must be escaped, for example \\( and \\bar.
Section pages
Section index pages such as content/episodes/_index.md or content/glossary/_index.md usually only need:
titleweight- optional descriptive body text
Validator expectations
The shared check command currently expects:
- every episode to define all required fields
- every episode weight to be unique
- weight values to be integers
If you intentionally want a draft episode excluded from normal builds, still give it complete front matter. That keeps previews and future publication simpler.