From 8b66041b5ae1e4bb689186db322c641801791466 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:28:21 +0200 Subject: [PATCH] chore: fail on a wiki page left out of the nav A wiki page is published as soon as it exists, but one missing from the nav is reachable only by a link, and MkDocs reports that at info level. getting-started.md stays out on purpose. --- tests/test_site_funnel.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_site_funnel.py b/tests/test_site_funnel.py index 593e1a81..a6a2e92e 100644 --- a/tests/test_site_funnel.py +++ b/tests/test_site_funnel.py @@ -95,6 +95,21 @@ class EveryPlatformOnThePicker(unittest.TestCase): with self.subTest(platform=key): self.assertIn(f"| [{name}](platforms/{key}.md) |", page) + def test_every_wiki_page_is_in_the_navigation(self): + """A wiki page is published as soon as it exists, but a page left out + of the nav is reachable only by a link and MkDocs says so at info + level. getting-started.md is kept out on purpose: it only links the + pages that took its content, for the old links that point to it.""" + # mkdocs.yml is what generate_site writes, and CI checks it is current. + nav = (Path(__file__).resolve().parents[1] / "mkdocs.yml").read_text(encoding="utf-8") + kept_out = {"getting-started.md"} + wiki = Path(__file__).resolve().parents[1] / "wiki" + missing = sorted( + p.name for p in wiki.glob("*.md") + if p.name not in kept_out and f"wiki/{p.name}" not in nav + ) + self.assertEqual(missing, []) + def test_every_platform_is_in_the_navigation_of_its_group(self): registry = load_platform_registry(str(REPO_ROOT / "platforms")) coverages = {