fix: settle the round 4 site merge

Root pages nothing produced are swept, so a table moved to a platform page no longer keeps the address its redirect needs. Data tree pages name their readers, board crumbs end on the Arcade page once, fba2012 is headed FB Alpha 2012, test profiles get no page, and the installer glance lists --declared-only and --offline. sitesources.py goes through run_cli.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 20:04:33 +02:00
1 parent de55360b56
commit e5cd024e2e
15 files changed
+246 -44

No files matched your search

+17
View File
@@ -69,3 +69,20 @@ def _sweep_generated(docs: Path, directories: list[str]) -> int:
if path.is_dir() and not any(path.iterdir()):
path.rmdir()
return removed
def _sweep_top_pages(docs: Path) -> int:
"""Delete the pages at the root of the docs tree this run did not produce.
The root holds only generated pages, one per stem (`cross-reference-*`,
`gaps-*`), and a stem that stops being produced, such as a platform
whose core table moved to its own page, otherwise kept its old page
and claimed the address its redirect needs.
"""
removed = 0
for path in sorted(docs.glob("*.md*")):
if (path.is_file() and path.suffix in (".md", ".mdx")
and os.path.realpath(str(path)) not in _produced):
path.unlink()
removed += 1
return removed