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
33 changes: 10 additions & 23 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import starlight from "@astrojs/starlight";
import sentry from "@sentry/astro";
import sentryStarlightTheme, {
monochromeCodeTheme,
} from "@sentry/starlight-theme";
import { defineConfig } from "astro/config";

// Allow base path override via environment variable for PR previews
Expand All @@ -10,6 +13,9 @@ export default defineConfig({
base,
markdown: {
smartypants: false,
shikiConfig: {
theme: monochromeCodeTheme,
},
},
// Generate sourcemaps for Sentry. "hidden" produces .map files without
// adding //# sourceMappingURL comments to the output (the debug IDs
Expand Down Expand Up @@ -52,28 +58,9 @@ export default defineConfig({
href: "https://github.com/getsentry/cli",
},
],
expressiveCode: {
themes: ["github-dark"],
styleOverrides: {
frames: {
frameBoxShadowCssValue: "none",
editorActiveTabIndicatorTopColor: "transparent",
editorActiveTabIndicatorBottomColor: "transparent",
editorTabBarBorderBottomColor: "transparent",
editorTabBarBackground: "transparent",
terminalTitlebarBorderBottomColor: "transparent",
terminalTitlebarBackground: "rgba(255, 255, 255, 0.03)",
terminalBackground: "#0a0a0f",
},
borderRadius: "12px",
borderColor: "rgba(255, 255, 255, 0.1)",
codeBackground: "#0a0a0f",
},
},
plugins: [sentryStarlightTheme()],
components: {
ThemeProvider: "./src/components/ThemeProvider.astro",
Header: "./src/components/Header.astro",
ThemeSelect: "./src/components/ThemeSelect.astro",
PageTitle: "./src/components/PageTitle.astro",
},
head: [
Expand All @@ -91,7 +78,7 @@ export default defineConfig({
const path = window.location.pathname;
// Works with both / (prod) and /pr-preview/pr-XX (preview)
return path === '/' ||
/^\\/_preview\\/pr-(\\d+|main)\\/?$/.test(path);
/^\\/\\_preview\\/pr-(\\d+|main)\\/?$/.test(path);
}

function checkAtBottom() {
Expand Down Expand Up @@ -235,7 +222,7 @@ export default defineConfig({
},
{
label: "Commands",
autogenerate: { directory: "commands" },
items: [{ autogenerate: { directory: "commands" } }],
},
{
label: "Resources",
Expand All @@ -245,7 +232,7 @@ export default defineConfig({
],
},
],
customCss: ["./src/styles/custom.css"],
customCss: ["./src/styles/cli.css"],
}),
],
});
5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"preview": "astro preview"
},
"dependencies": {
"@astrojs/starlight": "^0.38.3",
"@astrojs/starlight": "^0.39.2",
"@sentry/astro": "^10.38.0",
"astro": "^6.1.8",
"@sentry/starlight-theme": "^0.3.0",
"astro": "^6.3.5",
"sharp": "^0.33.5",
"shiki": "^3.21.0"
}
Expand Down
Loading
Loading