Skip to content

fix/links: Replace absolute self-links with relative links (67 links) - #1899

Open
marcleblanc2 wants to merge 1 commit into
mainfrom
fix-absolute-self-links
Open

fix/links: Replace absolute self-links with relative links (67 links)#1899
marcleblanc2 wants to merge 1 commit into
mainfrom
fix-absolute-self-links

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

What

Rewrites every link to this site that was written as an absolute URL (https://sourcegraph.com/docs/…, http://sourcegraph.com/docs/…, https://docs.sourcegraph.com/…) as a relative link (/admin/config/site-config), in 15 files.

  • 32 pointed at the current route: prefix dropped.
  • 31 pointed at a moved page and only worked through src/data/redirects.ts: now link straight to the destination.
  • 4 needed a hand fix: the commands#commands-id-mode and features#shard-merging anchors no longer exist, github#github-com-rate-limits became #rate-limits, and the deleted gRPC guide now links to its archived 5.3 page.

Why

Absolute links leave the Vercel preview and the local dev server, and hide moved pages behind redirects. #1858 makes dev/check-links.mjs fail PRs that add them; this PR clears the backlog so that check starts from zero.

Verification

node dev/check-links.mjs --check-anchors --root <this branch> with the checker from #1858: 0 absolute self-links left, and no new findings against main (317 → 250 pre-existing findings; the 67 removed are all self-links).

Notes for reviewers

Links to this site written as https://sourcegraph.com/docs/..., http://, or
https://docs.sourcegraph.com/... leave the preview deployment and local dev
server, and 31 of them pointed at moved pages that only worked through
src/data/redirects.ts. Found and resolved by dev/check-links.mjs on #1858;
four links needed a hand fix because their anchor or page is gone.

Amp-Thread-ID: https://ampcode.com/threads/T-01a08a01-44c1-775b-84d0-d67ff9501905
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 10, 2026 7:04am UTC

Request Review

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.

1 participant