From afad1c993313dfa15a79c1c292d0186e9a408134 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 27 Jul 2026 01:20:21 -0400 Subject: [PATCH] docs(site): add custom 404 page with navigation links Created a custom Starlight 404 page (docs/manual/404.md) that includes LinkCards pointing to common sections (Installation, Troubleshooting, Function Reference). Also updated build-manual.py to prevent '404' from appearing in the generated sidebar. --- docs/build-manual.py | 2 +- docs/manual/404.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/manual/404.md diff --git a/docs/build-manual.py b/docs/build-manual.py index c876671..a9ec0e7 100644 --- a/docs/build-manual.py +++ b/docs/build-manual.py @@ -673,7 +673,7 @@ def build_site(root: Path, out: Path) -> list[dict]: target.parent.mkdir(parents=True, exist_ok=True) body = _inject_subheading_cards(body) _write_prettified(target, _page_fm(fm), prettify(body)) - if rel.name != "index.md": + if rel.name not in ("index.md", "404.md"): sidebar.append({"label": fm["title"], "link": "/" + rel.stem + "/"}) continue diff --git a/docs/manual/404.md b/docs/manual/404.md new file mode 100644 index 0000000..d4123cb --- /dev/null +++ b/docs/manual/404.md @@ -0,0 +1,15 @@ +--- +title: '404' +template: splash +editUrl: false +man: false +hero: + title: '404' + tagline: Page not found. Check the URL or try using the search bar. +--- + + + + + +