diff --git a/config/dot/quickshell/scripts/panama-settings-docs b/config/dot/quickshell/scripts/panama-settings-docs index b4a6b34..68d6333 100755 --- a/config/dot/quickshell/scripts/panama-settings-docs +++ b/config/dot/quickshell/scripts/panama-settings-docs @@ -46,6 +46,7 @@ PAGE_TITLES = { "accessibility": "Accessibility", "power": "Power & Lock", "datetime": "Date & Time", "applications": "Applications", "services": "System Health", "about": "About", + "gaming": "Gaming", } @@ -146,6 +147,17 @@ def render(entries, routes): if not visible: continue page = routes.get(group) + # A routed page with no title used to fall back to the raw page id, so + # the group "gaming" documented itself as "Found on **gaming**" while + # every other group named a real page. The staleness contract could not + # see it: regenerating reproduced the same wrong file, so the copy was + # current and wrong at once. Refusing to render is what makes the next + # page added here impossible to miss. + if page is not None and page not in PAGE_TITLES: + raise SchemaError( + f"group '{group}' routes to page '{page}', which has no entry in " + "PAGE_TITLES; add one rather than letting the id be printed as a name" + ) title = PAGE_TITLES.get(page, page or "—") lines += [f"## {group}", "", f"Found on **{title}**.", ""] lines += ["| Setting | Default | What it does |", "|---|---|---|"] diff --git a/docs/settings.md b/docs/settings.md index 1f1ebd6..8ee886d 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -113,7 +113,7 @@ Found on **Desktop & Dock**. ## gaming -Found on **gaming**. +Found on **Gaming**. | Setting | Default | What it does | |---|---|---|