Skip to content

Fix broken relative links in docs - #131865

Merged
jkotas merged 1 commit into
dotnet:mainfrom
kutsibalci:docs-fix-broken-relative-links
Aug 5, 2026
Merged

Fix broken relative links in docs#131865
jkotas merged 1 commit into
dotnet:mainfrom
kutsibalci:docs-fix-broken-relative-links

Conversation

@kutsibalci

Copy link
Copy Markdown
Contributor

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

File Link Why it breaks
docs/workflow/wasm-documentation.md ../../design/...../design/... The doc is in docs/workflow/, so ../../ escapes the repo root
docs/workflow/wasm-documentation.md ../testing/mono/testing.mdtesting/mono/testing.md ../ lands in docs/, but the target is under docs/workflow/
docs/workflow/debugging/mono/wasm-debugging.md ../testing/...../../testing/... Off by one level from docs/workflow/debugging/mono/
docs/workflow/debugging/mono/wasm-debugging.md ../../src/mono/wasi/README.md../../../../src/... Needs four levels to reach the repo root
docs/workflow/debugging/mono/wasm-debugging.md debugging/libraries/...../libraries/... Resolved as if the doc were in docs/workflow/
docs/design/datacontracts/data_descriptor.md contract_descriptor.mdcontract-descriptor.md The file is spelled with a hyphen
docs/design/datacontracts/datacontracts_design.md contract_descriptor.mdcontract-descriptor.md Same
docs/design/features/globalization-icu-wasm.md docs\workflow\Codespaces.md../../workflow/Codespaces.md Windows backslashes, and resolved from the repo root rather than the document's directory

The contract_descriptor.md one is worth calling out because data_descriptor.md links to that same file correctly twice elsewhere (lines 102 and 300, as contract-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/**/*.md against a full checkout, decoding %20 and 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 in viewing-jit-dumps.md, literal ... placeholders in libraries-packaging.md, schemeless URLs (www.llvm.org, aka.ms/aspnet/benchmarks), and a link that carries a title attribute ([doc](path "doc") in unix-instructions.md, whose target does exist).

  • Imported external contentdocs/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 from wasm-documentation.md:42 and wasm-debugging.md:534. No file by that name exists anywhere in the repo.
    • docs/workflow/building/coreclr/crossgen.md, referenced from source-generator-pinvokes.md:7 and glossary.md:45.
    • package-projects.md, referenced from adding-api-guidelines.md:4. There is a libraries-packaging.md in the same directory, but I did not want to assume that is the replacement.
    • .github/prompts/add-new-jit-ee-api.prompt.md, referenced from updating-jitinterface.md:29. That directory contains only docs.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.md use anchors that do not match any heading GitHub generates: #Compatible_contracts and #Contract_descriptor, where the headings are ### Compatible contracts and ## 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

  • Every replacement target was confirmed to exist in a full clone of main.
  • The re-run sweep confirms all 8 now resolve.
  • Documentation only: 5 files, +8/-8, no code or build changes.
  • There is no markdown link checker in CI (I looked under .github/ and eng/), 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.

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

Copy link
Copy Markdown
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.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 5, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@kutsibalci

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas
jkotas merged commit 97dd992 into dotnet:main Aug 5, 2026
32 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Meta community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants