Sites & Templates
A site block configures one output site — its template, title, theme, and navigation. A document can declare several sites; each page joins one or more via its sites field.
Fields
webpage template
Hugo-style site header, sticky top navbar built from menu, and a reading column.
site marketing {
default_template = :webpage
title = "My project"
root = true
theme = :nord
menu {
item "Home" { page = index }
item "Docs" { href = "docs/" }
item "More" {
item "About" { page = about }
item "Contact" { page = contact }
}
item "Source" { href = "https://github.com/example/proj" }
}
}
Menu items use page = <name> for in-site links (validated against pages in this site) or href = "…" for external or cross-site URLs. Nested items become dropdown groups.
book template
mdBook-style fixed left sidebar with nested chapters and current-chapter highlight; reading column on the right.
site docs {
default_template = :book
title = "Project Docs"
theme = :nord
theme_toggle = true
toc {
chapter "Intro" { page = index }
chapter "Guide" {
chapter "Setup" { page = setup }
chapter "First run" { page = first_run }
}
}
}
Chapters nest to any depth. A chapter with no page = is a grouping heading. A chapter pointing at an unknown page is a build error.
presentation template
A reveal.js-style slide deck: the whole site renders into a single index.html, navigated with the keyboard. The deck block lays out the 2-D grid — each section is a column, its slides are rows — and each slide names a page that belongs to this site.
site talk {
default_template = :presentation
title = "My talk"
theme = :catppuccin
deck {
section "Intro" {
slide title
slide agenda
}
section "Main" {
slide topic
}
}
}
Keyboard navigation
← → move between sections, ↑ ↓ between the slides within a section, Space / PageDown step forward (revealing fragments, then advancing), s toggles speaker notes, f fullscreen. A progress bar, slide counter, and nav-hint arrows update as you go.
Each slide must sit on its own line (like li / chapter). A slide pointing at an unknown page is a build error. Two in-slide blocks are deck-specific:
| Block | Renders |
|---|---|
| fragment { … } | A step-reveal group — its content stays hidden until the presenter advances with Space |
| notes { … } | Speaker notes — hidden in the deck, shown in the overlay toggled with s |
page topic {
h2 "Key points"
fragment { p "Revealed on the first Space" }
fragment { p "…then this one" }
notes { p "Reminder: mention the benchmark numbers." }
}