Skip to content

Writing a lab in chapters

Chapter 1 · Structure a multi-file lab

1. Create the lab file

The lab file holds the frontmatter and lists its chapters, in reading order:

---
id: my-lab
title: My lab
chapters:
  - 01-setup.md
  - chapters/02-deploy.md
---

Chapter files must live inside the lab folder. Any content below the lab file's frontmatter, apart from its # title, is ignored.

Chapter 1 · Structure a multi-file lab

2. Write the chapters

Each chapter is a regular Markdown file whose ## headings are steps. Its title comes from, in order:

  1. a title in its frontmatter,
  2. its # heading,
  3. its file name (01-setup.md becomes "Setup").

Chapter files must not declare an id: they are part of a lab, not labs of their own1.

Footnotes

  1. Every Markdown file that is not listed as a chapter is still built as a standalone lab. ↩

Chapter 2 · Link between chapters

2. Use images

Image paths are relative to the chapter file:

Architecture

Chapter 2 · Link between chapters

3. Wrap up

Steps are numbered per chapter, and your progress is saved per step, so editing one chapter does not reset readers' progress in the others.