Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ jobs:
source-dir: docs/dist/
preview-branch: gh-pages
umbrella-dir: pr-preview
pages-base-url: cli.sentry.dev
action: auto
8 changes: 4 additions & 4 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

// Allow base path override via environment variable for PR previews
const base = process.env.DOCS_BASE_PATH || "/cli";
const base = process.env.DOCS_BASE_PATH || "/";

export default defineConfig({
site: "https://getsentry.github.io",
site: "https://cli.sentry.dev",
base,
integrations: [
starlight({
Expand Down Expand Up @@ -59,8 +59,8 @@ export default defineConfig({

function isLandingPage() {
const path = window.location.pathname;
// Works with both /cli (prod) and /pr-preview/pr-XX (preview)
return path === '/cli' || path === '/cli/' ||
// Works with both / (prod) and /pr-preview/pr-XX (preview)
return path === '/' ||
/^\\/pr-preview\\/pr-\\d+\\/?$/.test(path);
}

Expand Down
Loading