Point stale docs.sourcegraph.com links at sourcegraph.com/docs - #1851
Open
bahrmichael wants to merge 1 commit into
Open
Point stale docs.sourcegraph.com links at sourcegraph.com/docs#1851bahrmichael wants to merge 1 commit into
bahrmichael wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bahrmichael
marked this pull request as ready for review
September 3, 2026 12:16
marcleblanc2
added a commit
that referenced
this pull request
Sep 11, 2026
…#1899) ## 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 - Bare URLs in prose and code blocks (e.g. the `See https://docs.sourcegraph.com/admin/observability/tracing` cells in `docs/cli/references/*`) are not links and are untouched; #1851 covers those. - `docs/admin/repo/perforce.mdx`, `docs/self-hosted/observability/alerts.mdx` and `dashboards.mdx` are synced from sourcegraph/sourcegraph (#1883); the same links need the same fix upstream or the next sync reverts them. - `docs/technical-changelog.mdx` holds 31 of the links and is retired by #1888; if that lands first, take the deletion. Co-authored-by: Amp <amp@ampcode.com>
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.
docs.sourcegraph.comis no longer the docs host. This rewrites the remaining absolute references to theirsourcegraph.com/docsequivalents.The rewrite is purely mechanical — only the host portion changes (
docs.sourcegraph.com/<path>becomessourcegraph.com/docs/<path>). Paths that were reorganised since (for exampleadmin/observability/tracingandbatch_changes/references/troubleshooting) are already covered by permanent redirects in the docs site's redirect map, so the rewritten links resolve.In
src-cli,CHANGELOG.mdis deliberately left alone: those entries are a historical record. In the docs repo the change is scoped todocs/cli/references/**, which is generated fromsrc-clibysrc doc— the companionsrc-clichangeset fixes the generator's source strings so the docs stay correct after the next regeneration.Created by a Sourcegraph agentic batch change.