Skip to content

Fix dead docs links and fail the build on dangling internal links - #2

Merged
zyansheep merged 1 commit into
mainfrom
fix/docs-dead-links
Aug 26, 2026
Merged

Fix dead docs links and fail the build on dangling internal links#2
zyansheep merged 1 commit into
mainfrom
fix/docs-dead-links

Conversation

@zyansheep

Copy link
Copy Markdown
Contributor

https://dither.link/docs/dither/inspirations.html (linked from the main Dither page) was a 404: dither.md linked dither/inspirations.md, which never existed, and inspirations.md itself was not in SUMMARY.md, so mdbook never rendered it anywhere.

What changed

  • dither-spec (aee25b7): fixed all six stale links in dither.md; listed inspirations.md and dither/interoperability.md in SUMMARY.md; fixed interoperability.md's own root-relative links; added an mdbook redirect from the long-published /dither/inspirations.html to the real page.
  • Hugo pages: inspiration.md linked docs/dither/... without a leading / (→ /inspiration/docs/..., 404), and papers.md linked ./papers/...pdf (→ /papers/papers/..., 404).
  • Recurrence: build.sh now ends with lychee --offline over public/, failing the build on any internal link whose target was not generated. Since the workflow builds on PRs, a dangling link is caught before merge. lychee is pinned to the nixpkgs version (0.11.1) in both the devshell and CI, like the other tools.
  • .lycheeignore: allowlist of the ~13 dangling links that predate the check, grouped by cause (spec page exists but is not in SUMMARY.md; wrong ../ depth; target never written). Each is a follow-up: list the page or fix/remove the link, then drop the entry.

Test plan

  • nix develop --command ./build.sh passes locally (2759 links, 0 errors); public/docs/inspirations.html and the dither/inspirations.html redirect are generated
  • Deliberately dangling links (before the interoperability.md fix) made the build exit non-zero
  • PR build job green (validates the lychee download + check on ubuntu)
  • After merge: https://dither.link/docs/inspirations.html and https://dither.link/docs/dither/inspirations.html return 200

This PR — the changes and this description — was generated by Claude.

dither-spec bump: dither.md's links (inspirations, interoperability,
routing, trail search, user management, design philosophy) pointed at
paths that never existed, and inspirations.md / interoperability.md were
not listed in SUMMARY.md, so mdbook never rendered them. The long-published
/docs/dither/inspirations.html now redirects to the real page.

The Hugo pages had the same class of bug: inspiration.md and papers.md
used relative paths that resolved under their own section
(/inspiration/docs/..., /papers/papers/...).

build.sh now ends with lychee --offline over public/, so any internal link
whose target was not generated fails the build -- and, via the PR build,
is caught before merge. Dangling links that predate the check are
allowlisted in .lycheeignore with the reason for each. lychee is pinned to
the nixpkgs version in both the devshell and CI, like the other tools.

Co-Authored-By: Claude <noreply@anthropic.com>
@zyansheep
zyansheep merged commit ceae06c into main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant