Rheo

Spines

A spine in Rheo is the backbone or ‘table of contents’ of Typst source files that should be compiled to an output format. It takes its name from the EPUB specification, in which the spine articulates—or reticulates— the set and order of chapters included.

Directory-scan default

With no configuration at all, the spine is built from content_dir’s own directory structure:

This default is enough for most projects: name your files and folders in the order you want them read, and the spine follows.

[spine] exclude

To omit files or folders from the scan without moving them out of content_dir, list glob patterns (relative to content_dir) under [spine] exclude:

[spine]
exclude = ["drafts/**", "TODO.typ"]

Excluded paths are dropped from every format’s spine.

[[spine.section]]

[[spine.section]] groups matched files under a virtual directory, without moving them on disk. This is useful for reshaping the spine’s structure independently of your folder layout:

[[spine.section]]
name = "chapters"
include = ["ch-*.typ"]

Per-format overrides

A format-specific table — [pdf.spine], [html.spine], [epub.spine] — overrides the global [spine] table field by field: any field the per-format table sets replaces the matching global field, and any field it leaves unset still falls back to the global [spine].

[spine]
exclude = ["drafts/**"]

[pdf.spine]
title = "My Book"   # combined-output title, PDF/EPUB only

Here PDF still inherits the global exclude, even though it only sets its own title.

Each format uses its spine slightly differently. See the PDF, HTML, and EPUB format pages for details on how spines are configured and what defaults are applied for each output.