Fix dead docs links and fail the build on dangling internal links - #2
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://dither.link/docs/dither/inspirations.html(linked from the main Dither page) was a 404:dither.mdlinkeddither/inspirations.md, which never existed, andinspirations.mditself was not inSUMMARY.md, so mdbook never rendered it anywhere.What changed
aee25b7): fixed all six stale links indither.md; listedinspirations.mdanddither/interoperability.mdinSUMMARY.md; fixedinteroperability.md's own root-relative links; added an mdbook redirect from the long-published/dither/inspirations.htmlto the real page.inspiration.mdlinkeddocs/dither/...without a leading/(→/inspiration/docs/..., 404), andpapers.mdlinked./papers/...pdf(→/papers/papers/..., 404).build.shnow ends withlychee --offlineoverpublic/, 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.lycheeis 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 inSUMMARY.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.shpasses locally (2759 links, 0 errors);public/docs/inspirations.htmland thedither/inspirations.htmlredirect are generatedinteroperability.mdfix) made the build exit non-zerohttps://dither.link/docs/inspirations.htmlandhttps://dither.link/docs/dither/inspirations.htmlreturn 200This PR — the changes and this description — was generated by Claude.