Skip to content

One source

A chapter is written once. The book renders it a single time into an intermediate HTML where numbers, cross-references and notes are already resolved; only its serialisation changes with the output.

OutputWhat the chapter becomes
WebOne page per chapter, notes at its end with a link back to each call, the table of contents as the sidebar.
EPUB 3One XHTML file per chapter, notes as aside epub:type="footnote", the table of contents in nav.xhtml.
PDFThe printable view of the print chain (plan 15): named pages, running heads, page numbers.

The web edition

The third chapter of the novella, as the web edition shows it; the first is on the home page.

Lorem IpsumOpen fullscreen

Chapter 3

Dolor sit amet

Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit.

Temporibus autem quibusdam et aut officiis debitis1.

Notes

  1. Itaque earum rerum hic tenetur a sapiente delectus.

    ↩

The source

The entry of the book lists its chapters in reading order; each chapter is a Markdown file beside it.

examples/book-novella/book.md
--- title: Lorem Ipsum description: A novella in three chapters author: Dolor Sit format: book lang: en cover: ./images/cover.svg chapters: - file: 00-preface.md numbered: false - 01-lorem.md - 02-ipsum.md - 03-dolor.md front: - half-title - title - copyright - toc back: - notes publication: publisher: Lorem Press rights: © 2026 Dolor Sit, CC BY 4.0 edition: First edition ---

The EPUB

TerminalBash
npx recit export --to epub examples/book-novella/book.md npx recit export --to epub examples/book-novella/book.md --locale fr

Each command writes one EPUB per language and lists it in the exports.json beside the book, with its size and its SHA-256. Two exports of the same book give the same bytes.

On the site, the "Downloads" panel under the first page of the novella and of the handbook offers each book's EPUB and PDF, written by the same export after the build.

Opened, the EPUB of the novella holds the same chapters as the web edition, one XHTML file each, beside its cover and its table of contents:

Code
book.en.epub ├── mimetype application/epub+zip, first and uncompressed ├── META-INF/container.xml points to the package document └── OEBPS/ ├── content.opf title, author, language, the manifest and the reading order ├── nav.xhtml the table of contents and the landmarks ├── cover.xhtml the cover, images/cover.svg ├── styles.css ├── preface.xhtml, lorem.xhtml, ipsum.xhtml, dolor.xhtml └── images/

The JSON twin

Every file of a book has a typed JSON twin, checked by the schema of the format:

TerminalBash
npx recit convert book.md --to json --chapters

writes book.json to the standard output and 01-lorem.json, 02-ipsum.json… next to their chapters. The book assembled from the JSON files is the same book, page for page.