Skip to content

Commit 5615c12

Browse files
docs: migrate to @sentry/starlight-theme
Replace the 1900-line custom dark theme CSS and hand-rolled component overrides with the shared @sentry/starlight-theme Starlight plugin. Changes: - Add @sentry/starlight-theme dependency and plugin to astro config - Use monochromeCodeTheme for syntax highlighting (replaces github-dark) - Bump @astrojs/starlight to ^0.39.2 (theme peer dep) - Remove custom ThemeProvider, ThemeSelect, Header components (now provided by the shared theme) - Remove CodeBlock, CommandBox (unused) - Replace 1869-line custom.css with ~250-line cli.css containing only CLI-specific styles (splash page, feature sections, overscroll) - Update font references in components to use CSS custom properties - Update InstallSelector to use shared monochrome code theme - Use theme design tokens (--ve-*) in PageTitle
1 parent 95ff2e3 commit 5615c12

15 files changed

Lines changed: 407 additions & 2262 deletions

docs/astro.config.mjs

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import starlight from "@astrojs/starlight";
22
import sentry from "@sentry/astro";
3+
import sentryStarlightTheme, {
4+
monochromeCodeTheme,
5+
} from "@sentry/starlight-theme";
36
import { defineConfig } from "astro/config";
47

58
// Allow base path override via environment variable for PR previews
@@ -10,6 +13,9 @@ export default defineConfig({
1013
base,
1114
markdown: {
1215
smartypants: false,
16+
shikiConfig: {
17+
theme: monochromeCodeTheme,
18+
},
1319
},
1420
// Generate sourcemaps for Sentry. "hidden" produces .map files without
1521
// adding //# sourceMappingURL comments to the output (the debug IDs
@@ -52,28 +58,8 @@ export default defineConfig({
5258
href: "https://github.com/getsentry/cli",
5359
},
5460
],
55-
expressiveCode: {
56-
themes: ["github-dark"],
57-
styleOverrides: {
58-
frames: {
59-
frameBoxShadowCssValue: "none",
60-
editorActiveTabIndicatorTopColor: "transparent",
61-
editorActiveTabIndicatorBottomColor: "transparent",
62-
editorTabBarBorderBottomColor: "transparent",
63-
editorTabBarBackground: "transparent",
64-
terminalTitlebarBorderBottomColor: "transparent",
65-
terminalTitlebarBackground: "rgba(255, 255, 255, 0.03)",
66-
terminalBackground: "#0a0a0f",
67-
},
68-
borderRadius: "12px",
69-
borderColor: "rgba(255, 255, 255, 0.1)",
70-
codeBackground: "#0a0a0f",
71-
},
72-
},
61+
plugins: [sentryStarlightTheme()],
7362
components: {
74-
ThemeProvider: "./src/components/ThemeProvider.astro",
75-
Header: "./src/components/Header.astro",
76-
ThemeSelect: "./src/components/ThemeSelect.astro",
7763
PageTitle: "./src/components/PageTitle.astro",
7864
},
7965
head: [
@@ -91,7 +77,7 @@ export default defineConfig({
9177
const path = window.location.pathname;
9278
// Works with both / (prod) and /pr-preview/pr-XX (preview)
9379
return path === '/' ||
94-
/^\\/_preview\\/pr-(\\d+|main)\\/?$/.test(path);
80+
/^\\/\\_preview\\/pr-(\\d+|main)\\/?$/.test(path);
9581
}
9682
9783
function checkAtBottom() {
@@ -245,7 +231,7 @@ export default defineConfig({
245231
],
246232
},
247233
],
248-
customCss: ["./src/styles/custom.css"],
234+
customCss: ["./src/styles/cli.css"],
249235
}),
250236
],
251237
});

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
"preview": "astro preview"
99
},
1010
"dependencies": {
11-
"@astrojs/starlight": "^0.38.3",
11+
"@astrojs/starlight": "^0.39.2",
1212
"@sentry/astro": "^10.38.0",
13-
"astro": "^6.1.8",
13+
"@sentry/starlight-theme": "^0.2.0",
14+
"astro": "^6.3.5",
1415
"sharp": "^0.33.5",
1516
"shiki": "^3.21.0"
1617
}

docs/src/components/CodeBlock.astro

Lines changed: 0 additions & 115 deletions
This file was deleted.

docs/src/components/CommandBox.astro

Lines changed: 0 additions & 138 deletions
This file was deleted.

docs/src/components/FeatureTerminal.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const { title = "Terminal" } = Astro.props;
6565

6666
.feature-terminal-body {
6767
padding: 0 1.5rem 1.25rem;
68-
font-family: 'JetBrains Mono', ui-monospace, monospace;
68+
font-family: var(--sl-font-mono);
6969
line-height: 1.6;
7070
color: rgba(255, 255, 255, 0.85);
7171
}
@@ -108,7 +108,7 @@ const { title = "Terminal" } = Astro.props;
108108

109109
/* Table box styles */
110110
.feature-terminal-body :global(.table-box) {
111-
font-family: 'JetBrains Mono', ui-monospace, monospace;
111+
font-family: var(--sl-font-mono);
112112
font-size: 0.7rem;
113113
line-height: 1.5;
114114
margin: 0;

0 commit comments

Comments
 (0)