Summary
~16 documentation links use /tree/<ref>/<path-to-a-file> where the path resolves to a file, not a directory. GitHub's canonical URL form for a file is /blob/<ref>/<path>; /tree/ is for directories.
These links are not broken. GitHub 301-redirects /tree/<file> → /blob/<file>, browsers render them fine, and the repo's .lychee.toml accepts 301, so the markdown link-check CI passes on them today. This is canonicalization / consistency polish, not a correctness fix — low priority.
PR #3232 incidentally canonicalized one instance (docs/oss/building-features/images.md) as an unprompted tidy. This issue tracks doing the rest consistently in one focused pass.
The one real care-point
A naive global s|/tree/|/blob/| is wrong. Some /tree/ links correctly point at directories and must be left as-is (a directory via /blob/ also misbehaves). Any cleanup must resolve each link's target as file-vs-directory and only rewrite the file ones.
File links to canonicalize (/tree/ → /blob/)
README.md — CONTRIBUTING.md, LICENSE.md
docs/oss/api-reference/redux-store-api.md — pages_controller.rb, application.html.erb, controller.rb, helper.rb
docs/oss/api-reference/view-helpers-api.md — RouterApp.server.jsx, helper.rb
docs/oss/core-concepts/render-functions-and-railscontext.md — helper.rb, react_on_rails.rb
docs/oss/core-concepts/how-react-on-rails-works.md — Procfile.dev
internal/contributor-info/linters.md — .eslintrc
internal/contributor-info/releasing.md — CONTRIBUTING.md
internal/contributor-info/pull-requests.md — react_on_rails.rb
internal/testimonials/README.md — PROJECTS.md, KUDOS.md
react_on_rails_pro/CONTRIBUTING.md — react_on_rails.rb
Directory links to LEAVE untouched (correctly /tree/)
NEWS.md, docs/oss/introduction.md, docs/oss/getting-started/examples-and-references.md — react_on_rails/spec/dummy
docs/oss/api-reference/view-helpers-api.md — .../spec/dummy/app/views/react_router (note: this file has BOTH a directory /tree/ link to keep and a file /tree/ link to fix on nearby lines — check per-link, not per-file)
docs/oss/building-features/node-renderer/error-reporting-and-tracing.md — .../integrations
Suggested approach
Per-link: resolve the path in the repo tree; if it's a file, rewrite /tree/ → /blob/; if a directory, leave it. One PR, docs-only, no content changes.
Summary
~16 documentation links use
/tree/<ref>/<path-to-a-file>where the path resolves to a file, not a directory. GitHub's canonical URL form for a file is/blob/<ref>/<path>;/tree/is for directories.These links are not broken. GitHub
301-redirects/tree/<file>→/blob/<file>, browsers render them fine, and the repo's.lychee.tomlaccepts301, so the markdown link-check CI passes on them today. This is canonicalization / consistency polish, not a correctness fix — low priority.PR #3232 incidentally canonicalized one instance (
docs/oss/building-features/images.md) as an unprompted tidy. This issue tracks doing the rest consistently in one focused pass.The one real care-point
A naive global
s|/tree/|/blob/|is wrong. Some/tree/links correctly point at directories and must be left as-is (a directory via/blob/also misbehaves). Any cleanup must resolve each link's target as file-vs-directory and only rewrite the file ones.File links to canonicalize (
/tree/→/blob/)README.md—CONTRIBUTING.md,LICENSE.mddocs/oss/api-reference/redux-store-api.md—pages_controller.rb,application.html.erb,controller.rb,helper.rbdocs/oss/api-reference/view-helpers-api.md—RouterApp.server.jsx,helper.rbdocs/oss/core-concepts/render-functions-and-railscontext.md—helper.rb,react_on_rails.rbdocs/oss/core-concepts/how-react-on-rails-works.md—Procfile.devinternal/contributor-info/linters.md—.eslintrcinternal/contributor-info/releasing.md—CONTRIBUTING.mdinternal/contributor-info/pull-requests.md—react_on_rails.rbinternal/testimonials/README.md—PROJECTS.md,KUDOS.mdreact_on_rails_pro/CONTRIBUTING.md—react_on_rails.rbDirectory links to LEAVE untouched (correctly
/tree/)NEWS.md,docs/oss/introduction.md,docs/oss/getting-started/examples-and-references.md—react_on_rails/spec/dummydocs/oss/api-reference/view-helpers-api.md—.../spec/dummy/app/views/react_router(note: this file has BOTH a directory/tree/link to keep and a file/tree/link to fix on nearby lines — check per-link, not per-file)docs/oss/building-features/node-renderer/error-reporting-and-tracing.md—.../integrationsSuggested approach
Per-link: resolve the path in the repo tree; if it's a file, rewrite
/tree/→/blob/; if a directory, leave it. One PR, docs-only, no content changes.