Skip to content

fix: rewrite all doc-relative links in header HTML, fix glossary link#802

Closed
kim-em wants to merge 1 commit intolean4from
fix-dead-links
Closed

fix: rewrite all doc-relative links in header HTML, fix glossary link#802
kim-em wants to merge 1 commit intolean4from
fix-dead-links

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Mar 4, 2026

This PR fixes two broken link issues found by the dead link checker in #792:

  • make_site.py only rewrites href="./Mathlib/" links from header-data.json to point into mathlib4_docs/, but header-data.json also contains links with ./Archive/, ./Init/, ./Batteries/, and ./foundational_types.html prefixes. These were left unrewritten, producing 133 broken links on the 100.html and 1000.html pages. Fix by rewriting all href="./" to href="./mathlib4_docs/".

  • The glossary entry for simp-normal form links to simp.html#simp-normal-form, but the actual page is at extras/simp.html.

🤖 Prepared with Claude Code

The header HTML from header-data.json contains doc-relative links for
all prefixes (Archive/, Init/, Batteries/, etc.), but only ./Mathlib/
links were being rewritten to ./mathlib4_docs/Mathlib/. This caused
broken links on 100.html and 1000.html for declarations in Archive/,
Init/, and Batteries/.

Fix by rewriting all href="./" links to href="./mathlib4_docs/",
matching the existing treatment of docs_link on line 417.

Also fix a broken relative link in the glossary: simp.html should be
extras/simp.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kim-em kim-em closed this Mar 4, 2026
@kim-em kim-em deleted the fix-dead-links branch March 4, 2026 06:02
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