Fix TypeDoc broken links - #172
Merged
Merged
Conversation
Links written as repository root absolute paths (`/engines/parser-sparql-1-1`) resolve on GitHub, but TypeDoc deliberately skips absolute paths when rewriting relative links, so they ended up pointing at comunica.github.io/engines/... on the documentation site. The same bug hid the logo on all seven engine pages, which embedded it as `/assets/white-on-red/...`. Both are now relative. The pages under docs/ were not part of the documentation at all: linking to them only registered them as assets, so guidelines.md was served as a raw text file instead of a rendered page. They are added through `projectDocuments`. What is left are links TypeDoc has no page for: source files and directories that are not a package. TypeDoc copies those into media/, which turns a source file into a raw text dump and a directory into a dead link, and `#L75` line anchors never survive onto a generated page. Rather than hardcoding the repository host in every markdown file, typedoc.plugin.mjs rewrites exactly those links using the `repositoryLinkTemplate` option, keeping the markdown relative and GitHub native, with the host configured in one place. Also fixes two links that were dead on GitHub as well: lib/toAlgebra.ts (the file lives at lib/toAlgebra/toAlgebra.ts) and a spec reference in algebra.ts that had lost its base URL. Verified over the built site: all internal links across 1232 pages resolve, and all local images resolve. Co-Authored-By: Claude Opus 5 <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.
No description provided.