Skip to content

docs: fix two broken links in README (license badge, docs reference) - #1068

Merged
usefulthink merged 1 commit into
visgl:mainfrom
cnYui:fix-readme-broken-links
Sep 6, 2026
Merged

docs: fix two broken links in README (license badge, docs reference)#1068
usefulthink merged 1 commit into
visgl:mainfrom
cnYui:fix-readme-broken-links

Conversation

@cnYui

@cnYui cnYui commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Two links in the root README.md currently return hard 404s. This PR fixes both; the diff is two lines and touches nothing else.

1. MIT License badge (line 3)

The badge links to /tree/main/LICENSE, but the repository's only license file is LICENSE.md — there is no path named LICENSE, so the badge 404s.

-](https://github.com/visgl/react-google-maps/tree/main/LICENSE)
+](https://github.com/visgl/react-google-maps/blob/main/LICENSE.md)

This is a missing file, not a /tree/ vs /blob/ quirk — GitHub happily resolves tree paths for files that exist:

$ curl -sSL -o /dev/null -w 'final=%{url_effective} code=%{http_code} redirects=%{num_redirects}\n' \
    https://github.com/visgl/react-google-maps/tree/main/LICENSE.md
final=https://github.com/visgl/react-google-maps/blob/main/LICENSE.md code=200 redirects=1

$ for f in LICENSE LICENSE.md LICENCE license; do
    printf '%s  raw .../main/%s\n' "$(curl -sS -o /dev/null -w '%{http_code}' \
      https://raw.githubusercontent.com/visgl/react-google-maps/main/$f)" "$f"; done
404  raw .../main/LICENSE
200  raw .../main/LICENSE.md
404  raw .../main/LICENCE
404  raw .../main/license

2. [docs] link reference (line 263)

This is the target of "Please see our [documentation][docs]" on line 66. It carries a trailing slash that the site does not serve.

-[docs]: https://visgl.github.io/react-google-maps/docs/
+[docs]: https://visgl.github.io/react-google-maps/docs

The root cause is the site's own deliberate configuration — website/docusaurus.config.js:18 sets trailingSlash: false, so the build emits no /docs/index.html and the trailing-slash form falls through to the Docusaurus 404 route:

$ grep -n 'trailingSlash' website/docusaurus.config.js
18:  trailingSlash: false,

$ curl -sSL .../docs  | grep -o '<title[^>]*>[^<]*</title>'   # -> Introduction | React Google Maps
$ curl -sSL .../docs/ | grep -o '<title[^>]*>[^<]*</title>'   # -> Page Not Found | React Google Maps

Line 263 was also the only trailing-slash visgl.github.io URL in the whole README (grep -cE '.../[^ ]*/$' README.md1); the ten [api-*] definitions above it and [examples] below it already omit it and all resolve.

Verification

Status codes before → after, run against the live site:

404  https://github.com/visgl/react-google-maps/tree/main/LICENSE     (old)
200  https://github.com/visgl/react-google-maps/blob/main/LICENSE.md  (new)
404  https://visgl.github.io/react-google-maps/docs/                  (old)
200  https://visgl.github.io/react-google-maps/docs                   (new)

The two 200s are real pages, not soft-404s — see the <title> check above. Both replacement URLs were re-extracted from the edited README.md and curled again to confirm they are exactly what the file now contains.

Checklist notes

  • Tests — not run. test:prettier checks ./src ./examples and test:linter checks src/**, so a root-README.md-only change is outside the suite's scope entirely; test:tsc and test:unit are likewise unaffected. Happy to run the full suite if you'd like it on the record.
  • Documentation — no public API added or modified, so no docs/api-reference, upgrade-guide.md or whats-new.md changes are needed.
  • Related issue — none open that I could find; this was spotted by link-checking the README.
  • Milestone — I can't set labels or milestones on this repo; please apply whichever is appropriate.

Limitation

For defect 2 you could alternatively make the site serve /docs/, but since trailingSlash: false is an intentional setting, the README is the aligned side to change. I deliberately did not rename LICENSE.md, which would be a larger unrequested change.

🤖 Generated with Claude Code

The MIT License badge pointed at `/tree/main/LICENSE`, but the only
license file in the repository is `LICENSE.md`, so the badge linked to a
404. Point it at `/blob/main/LICENSE.md`.

The `[docs]` link reference (used by "Please see our [documentation][docs]")
carried a trailing slash. The website sets `trailingSlash: false` in
website/docusaurus.config.js, so `/docs/` serves the Docusaurus 404 route
while `/docs` serves the page. It was also the only trailing-slash
visgl.github.io URL in the README; every sibling reference definition
already omits it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@usefulthink

Copy link
Copy Markdown
Collaborator

Thanks a lot! I can still access pages with and without a trailing slash, so not sure what you've been seeing, but removing the slash is consistent with other urls, so...

Also: please don't waste your tokens on something like that :D

@usefulthink
usefulthink merged commit f997625 into visgl:main Sep 6, 2026
2 checks passed
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.

2 participants