Skip to content

book.yaml: a chapter can name the part it opens, and the TOC groups by it - #27

Merged
alpibrupa merged 1 commit into
mainfrom
part-structure
Sep 3, 2026
Merged

book.yaml: a chapter can name the part it opens, and the TOC groups by it#27
alpibrupa merged 1 commit into
mainfrom
part-structure

Conversation

@alpibrupa

Copy link
Copy Markdown
Contributor

Closes the tooling half of alpibrusl/prompt-to-production#27.

Production is divided into five parts and is the easiest of its series to navigate. The other three books already have the same five-part structure — each names its parts in chapter 1's prose — and none of it was structural. book.yaml carried them as YAML comments, and the rendered TOC was a flat list of sixteen chapters.

Contents
  Part I — The Ground
    Chapter 1 — The Handoff
    Chapter 2 — Where Code Lives
    Chapter 3 — The Shape of an App
  Part II — Keeping It
    Chapter 4 — Keeping Every Version
    ...

part sits on the chapter that opens the part rather than in a parallel list, so a chapter cannot end up in two parts or in none. A book declaring no parts renders exactly as before — there is a test for that.

Three tests, and all four books build EPUB, HTML and PDF with their parts grouped.

🤖 Generated with Claude Code

…y it

Prompt to Production is divided into five parts and is by some distance the
easiest of the four books in its series to navigate. The other three have the
same five-part structure -- each names its parts in chapter 1's prose -- and
none of it was structural: book.yaml carried the parts as YAML *comments*, and
the rendered table of contents was a flat list of sixteen chapters.

`part` sits on the chapter that opens the part rather than in a separate list,
so a chapter cannot end up in two parts or in none. A book that declares no
parts renders exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant