docs: Add trailing slashes to relative internal links - #19675
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Follow-up to #19639, which covered root-relative links only. Relative links resolve in the browser against the current page and are requested verbatim, so a missing slash is still a 308. docs.sentry.io renders `href="../tags"` today, and that request redirects to `.../tags/` -- often on the same page as a correctly-written absolute link to the very same destination. Covers 1080 relative links across 83 files in docs/, includes/ and platform-includes/: parent-relative (`../tags`), same-directory (`./sibling`) and bare (`okta-scim`) forms, in markdown links and in href/to/url attributes. Also fixes 6 pre-existing double-slash links, which redirect for the same reason: /security-legal-pii/scrubbing//server-side-scrubbing/ -> 308 /security-legal-pii/scrubbing/server-side-scrubbing/ -> 200 Generated with the linter from #19666. Verified: every changed file differs from master only by added "/" characters, apart from the three double-slash files, which remove one by design; no external URL is altered; resolved destinations spot-checked against production return 200. Left alone, as in #19639: versioned `__vX.Y.Z` pages, which invert the rule; asset paths; fenced code; and angle-bracket autolinks whose URLs contain parentheses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
coolguyzone
force-pushed
the
coolguyzone/chore/fix-relative-inlinks
branch
from
October 1, 2026 18:39
d4b20bd to
8375172
Compare
KyleTryon
approved these changes
Oct 1, 2026
This was referenced Oct 5, 2026
coolguyzone
added a commit
that referenced
this pull request
Oct 5, 2026
## DESCRIBE YOUR PR The last bucket from the trailing-slash work in #19639 and #19675, which covered only the user docs. `develop-docs/` renders at **develop.sentry.dev** from the same Next config, so the same rule applies — a link without a trailing slash is served a 308 before the page loads: ``` https://develop.sentry.dev/backend/application-domains -> 308 https://develop.sentry.dev/backend/application-domains/ -> 200 ``` **240 links across 39 files**, produced by `pnpm lint:trailing-slash:fix` from #19666. No hand edits. ### Verification - Every changed file differs from master **only by added `/` characters** — no slash removed, no external URL altered, no other content touched - A sample of 25 rewritten destinations all return **200** on develop.sentry.dev - `pnpm lint:trailing-slash` is now clean for `develop-docs/` The 23 violations the linter still reports are drift in `docs/`, fixed separately in #19811. > Note: `AGENTS.md` describes `develop-docs/` as a submodule, but it isn't one — `git submodule status` is empty and the directory has direct commits in this repo. Worth correcting in that file at some point, though I've left it out of this PR. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've supplied a deadline. Thanks in advance for your help! ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This branch was successfully deployed
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.
DESCRIBE YOUR PR
This work was done programmatically using Claude; I have gone through the list of links and confirmed that they make sense (and our 404 catcher would catch any that break).
#19639 fixed root-relative links (
/product/issues). It missed relative ones (../tags,./sibling,okta-scim), which turned out to be the larger bucket. This finishes the job.Relative links resolve in the browser, against the current page, and are requested verbatim — nothing in the MDX pipeline rewrites them. So a missing trailing slash is still a 308. The live site proves it:
Both forms sit on the same page, pointing at the same doc.
docs/,includes/andplatform-includes/../tags), same-directory (./sibling) and bare (okta-scim) forms, in markdown links andhref/to/urlattributesHow this was found
The
check-pr(lychee) log on #19639. Its[EXCLUDED]lines are internal links skipped by design — but that dump doubles as a full inventory of every internal link, and it showed URLs likehttps://docs.sentry.io/attachment-scrubbingwith no trailing slash. Those traced back to[Attachment Scrubbing](../attachment-scrubbing), a form the linter never matched.A full audit of link forms across the docs surface:
/foohttp(s)../foo./foo#foofoo/barVerification
/characters: no slash removed, no external URL altered, no other content touched.200.Left alone
Same carve-outs as #19639 — versioned
__vX.Y.Zpages (which invert the rule), asset paths, and fenced code. Plus one new one worth calling out: angle-bracket autolinks whose URL contains parentheses, e.g.[`main()`](<https://developer.apple.com/documentation/swiftui/app/main(_:)>). A naive bare-relative match swallows those and corrupts the URL; site paths never contain(,<or>, so those characters are excluded. That removed 15 false positives, and there's a regression test for it.IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code