D0009 orphan-pages¶
Rule: Every page of the book is in the navigation or linked from another page.
| Code | D0009 (stable, never reused) |
| Id | orphan-pages |
| Category | book |
| Source | spirit_level |
| Fix | by hand |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | warn |
a page nobody reaches is published, unread and left to go stale |
| small-workspace | warn |
a page nobody reaches is published, unread and left to go stale |
| medium | warn |
a page nobody reaches is published, unread and left to go stale |
| big | warn |
a page nobody reaches is published, unread and left to go stale |
| ai | off | |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Why¶
Zensical builds every page in the docs folder, whether or not the navigation lists it. A page that is neither in the navigation nor linked from another page is published but unreachable: no reader finds it, and nobody notices when it goes out of date.
A page counts as reached when the navigation lists it, or another page of the book links to it. The home page (index.md) is always reached. A page that not_in_nav names is left out on purpose and not judged. Pages that exclude_docs or draft_docs leave out of the build are not judged. The book's configuration is zensical.toml, or mkdocs.yml for a book Zensical builds from a legacy MkDocs project.
How to fix¶
Add the page to nav, or link to it from a page that readers reach. Delete it if nobody needs it.
Configure¶
Allow one finding in the code with // spirit-level: allow(orphan-pages) <reason> (waivers); the code works there too, as in [lints.D0009].