Skip to content

Fix broken anchors and links found by check-links --check-anchors - #1861

Open
marcleblanc2 wants to merge 1 commit into
mainfrom
fix-broken-links-and-anchors
Open

Fix broken anchors and links found by check-links --check-anchors#1861
marcleblanc2 wants to merge 1 commit into
mainfrom
fix-broken-links-and-anchors

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

Fixes every broken internal link and #anchor reported by npm run check-links -- --check-anchors (the checker from #1858, with its fence-stripping and duplicate-route fixes). 123 files, links only, no prose rewrites beyond a few unlinked phrases.

What changed

  • Renamed / mistyped anchors corrected to the slug the heading actually produces (#index-jobs#index_jobs, #kubernetes#kubernetes-helm, #nginx-ssl-https-configuration#nginx-sslhttps-configuration, alert/dashboard slugs with underscores, #Literal-search-default#keyword-search-default, etc.).
  • Moved content relinked: /admin/faq#…/self-hosted/faq#…, docker-compose anchors → /self-hosted/deploy/docker-compose/{configuration,operations}, kustomize file anchors → /self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files, #template / #base → the deploy-sourcegraph-k8s directories on GitHub.
  • Site-config and code-host #key anchors dropped: those pages render the schema as a code block, so there are no per-key headings to link to. builtin / saml / openidconnect auth links now point at /admin/auth/builtin, /admin/auth/saml, /admin/auth#openid-connect.
  • Dead sections: anchor dropped, page link kept.
  • href="#" QuickLink placeholders on the Kubernetes pages now point at the page they describe.
  • Corrupted markup: [search.largeF[iles](...) and The o)rder in technical-changelog.mdx; `"true``` / `"*``` inline code in batch-spec-yaml-reference.mdx (these stray backticks also broke the checker's fence tracking); stray " in an anchor in kubernetes/troubleshoot.mdx.

Follow-up (not in this PR)

Three routes have two source files, and the site serves the first one glob order returns; the other is unreachable:

  • cli/references/auth: auth.mdx (served) vs auth/index.mdx (richer, links subcommands)
  • cli/references/codeowners: same pattern
  • self-hosted/deploy/kubernetes/kustomize: kustomize.mdx (served) vs kustomize/index.mdx (concept doc, shadowed since 2024)

Each pair should be merged or one deleted.

Verify

npm run check-links -- --check-anchors

@vercel

vercel Bot commented Sep 6, 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 6, 2026 10:13am 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