D0010 page-title¶
Rule: Every page of the book has one title.
| Code | D0010 (stable, never reused) |
| Id | page-title |
| Category | book |
| Source | spirit_level |
| Fix | by hand |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | warn |
a page without a title is shown under its file name |
| small-workspace | warn |
a page without a title is shown under its file name |
| medium | warn |
a page without a title is shown under its file name |
| big | warn |
a page without a title is shown under its file name |
| ai | off | |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Why¶
Zensical takes a page's title from its navigation entry, its front matter title, or its first # heading. A page with none of them is shown under its file name, getting_started instead of "Getting started". A page with two # headings has two titles: the browser tab shows the first, and the second looks like a new page.
The lint checks every page the book builds: it needs a # heading or a title: in its front matter, and at most one # heading (none when the front matter sets the title).
How to fix¶
Open the page with one # Title heading. Make every other top-level heading a ## section, or move it to a page of its own.
Configure¶
Allow one finding in the code with // spirit-level: allow(page-title) <reason> (waivers); the code works there too, as in [lints.D0010].