Fix broken relative links in docs - #131865
Merged
Merged
Conversation
Eight markdown links in docs/ resolve to paths that do not exist, so they 404 on GitHub. The target files are all present in the repo; only the link text is wrong. - wasm-documentation.md lives in docs/workflow/, so `../../design/...` escapes the repo root and `../testing/...` lands in docs/ rather than docs/workflow/. - wasm-debugging.md lives in docs/workflow/debugging/mono/; its links to the testing docs, to src/mono/wasi/README.md and to the VS Code debugging guide are each off by one or more directory levels. - The datacontracts docs link to contract_descriptor.md, but the file is named contract-descriptor.md with a hyphen. The same file links to it correctly elsewhere. - globalization-icu-wasm.md uses Windows backslashes in a markdown link and resolves from the repo root instead of the document's directory. The repository has no markdown link checker in CI, which is why these went unnoticed.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 15 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-meta |
Contributor
Author
|
@dotnet-policy-service agree |
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.
Eight markdown links in
docs/point at paths that do not resolve, so they 404 on GitHub. In every case the target file is present in the repo and only the link text is wrong — these are relative-path mistakes, not missing documentation.The fixes
docs/workflow/wasm-documentation.md../../design/...→../design/...docs/workflow/, so../../escapes the repo rootdocs/workflow/wasm-documentation.md../testing/mono/testing.md→testing/mono/testing.md../lands indocs/, but the target is underdocs/workflow/docs/workflow/debugging/mono/wasm-debugging.md../testing/...→../../testing/...docs/workflow/debugging/mono/docs/workflow/debugging/mono/wasm-debugging.md../../src/mono/wasi/README.md→../../../../src/...docs/workflow/debugging/mono/wasm-debugging.mddebugging/libraries/...→../libraries/...docs/workflow/docs/design/datacontracts/data_descriptor.mdcontract_descriptor.md→contract-descriptor.mddocs/design/datacontracts/datacontracts_design.mdcontract_descriptor.md→contract-descriptor.mddocs/design/features/globalization-icu-wasm.mddocs\workflow\Codespaces.md→../../workflow/Codespaces.mdThe
contract_descriptor.mdone is worth calling out becausedata_descriptor.mdlinks to that same file correctly twice elsewhere (lines 102 and 300, ascontract-descriptor.md), so this is an inconsistency inside a single document rather than a rename that was missed.How these were found, and what was left alone
I resolved every relative markdown link in
docs/**/*.mdagainst a full checkout, decoding%20and normalising./..before deciding anything. The sweep produced 39 candidates; these 8 are the ones where the target exists and the link is simply pointing at the wrong place. After the change the same sweep no longer reports them.The remaining 31 were not touched, for these reasons:
Not links at all — my pattern also matched things shaped like
[...](...)in prose and code: generic type argument lists inviewing-jit-dumps.md, literal...placeholders inlibraries-packaging.md, schemeless URLs (www.llvm.org,aka.ms/aspnet/benchmarks), and a link that carries a title attribute ([doc](path "doc")inunix-instructions.md, whose target does exist).Imported external content —
docs/design/mono/web/*came from the old mono-project.com site and uses site-absolute paths like/docs/advanced/aot/;docs/design/coreclr/profiling/davbr-blog-archive/*is an archived blog with filenames containing spaces and entities. Rewriting either is a separate decision about archived material, not a link fix.Target genuinely absent — I could not fix these without guessing what was intended, so I am listing them rather than changing them:
debugging-wasm.md, referenced fromwasm-documentation.md:42andwasm-debugging.md:534. No file by that name exists anywhere in the repo.docs/workflow/building/coreclr/crossgen.md, referenced fromsource-generator-pinvokes.md:7andglossary.md:45.package-projects.md, referenced fromadding-api-guidelines.md:4. There is alibraries-packaging.mdin the same directory, but I did not want to assume that is the replacement..github/prompts/add-new-jit-ee-api.prompt.md, referenced fromupdating-jitinterface.md:29. That directory contains onlydocs.prompt.md.Happy to fix any of those in a follow-up if someone can confirm the intended targets.
A note on anchors
Two links in
data_descriptor.mduse anchors that do not match any heading GitHub generates:#Compatible_contractsand#Contract_descriptor, where the headings are### Compatible contractsand## Contract descriptor. I have not changed them, because the page now loads correctly and the exact anchor style is a call for the doc owners. Mentioning it in case it is worth a separate pass.Verification
main.+8/-8, no code or build changes..github/andeng/), which is consistent with these going unnoticed.AI disclosure
AI-assisted (Claude Code). The tool was used to run the link-resolution sweep described above and to draft this description. The findings were verified before opening: each target was checked against a full checkout, each corrected path was re-resolved, and the false positives listed above were reviewed one by one and deliberately excluded. I have reviewed and understood the change and take responsibility for it.