Repository navigation
feat(cli-docs): Show a banner to visitors redirected from docs.sentry.io - #2869
Merged
Merged
Conversation
The docs.sentry.io /cli/* redirects add ?from=sentry-docs to their cli.sentry.dev destinations. With that param, a banner above the page content says the docs moved and links the v3 migration guide and getsentry/sentry-cli, then the param is dropped from the address bar. Without it, the page is unchanged. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
BYK
approved these changes
Dec 3, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
All good except for "It lives" part. It doesn't live there, it's the tombstone, or obituary, or like a zombie/ghost/soul? Something fun like that. But not live.
BYK
approved these changes
Dec 3, 2026
14 of 16 tasks
1 of 6 tasks
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.
The old docs.sentry.io
/cli/*pages are moving to cli.sentry.dev, and getsentry/sentry-docs#20979 adds?from=sentry-docsto every redirect destination. People who land here that way get a banner above the page content:RedirectBanner.astroholds the banner in a<template>and an inline script. When the URL hasfrom=sentry-docs, the script inserts the banner right before<main>and removes the param from the address bar withhistory.replaceState, keeping other params and the hash. Nothing is stored or tracked.PageFrameoverride, next to the analytics components. Without the param, pages render as they do today.bannerfrontmatter is static per page, so it can't depend on the query param. Putting anything inside<main>before the content also breaks the theme'smain > .content-panel:first-childspacing, which is why the banner goes above<main>instead.Screenshots
/getting-started/?from=sentry-docs(address bar ends up as/getting-started/):/?from=sentry-docs:/getting-started/without the param:via @BYK.
--
View Session [Sentry]