Skip to content

A chapter that isn't there

publish.txt lists the chapters a build reads. A line naming a file the build cannot read is most often a typo in its path, or a chapter renamed or moved without updating the list; a list naming no chapter builds nothing.

What it looks like

ERROR: publish.txt names chapters that are missing or unreadable:
  manuscript/chapter-2.md
  chapter-3.md
  Correct each path, relative to the project root, or remove its line.
  See https://keystone.knight-owl.dev/errors/chapter-not-found/#a-path-it-cant-read
ERROR: 'publish.txt' is empty
  Add your chapter files.
  See https://keystone.knight-owl.dev/errors/chapter-not-found/#the-list-is-empty

What it means

A path it can't read

Every line of publish.txt is checked before any chapter is read, so one build names every path it cannot open. A path is read from the project root, so chapter-1.md alone does not find manuscript/chapter-1.md. A directory, or a file the build has no permission to read, is reported the same way.

Correct the path, or remove its line

Each line is a path from the project root, such as manuscript/chapter-1.md; publish.txt covers the rest of the file. A line opening with # drops a chapter without deleting it.

The list is empty

Lines opening with #, and blank ones, name no chapter, so a list holding only those builds nothing.

List your chapters in reading order

One path per line, from the project root. See publish.txt.