diff --git a/astro.config.ts b/astro.config.ts index 7096ad6d99..5a38570049 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -37,40 +37,7 @@ export default defineConfig({ }), astroAsides(), astroYoutubeEmbeds(), - astroExpressiveCode({ - themes: ['slack-ochin', 'slack-dark'], - themeCssSelector: (theme) => { - if (theme.name === 'slack-ochin') return ':root:not(.theme-dark)'; - if (theme.name === 'slack-dark') return ':root.theme-dark'; - return `[data-theme='${theme.name}']`; - }, - styleOverrides: { - borderColor: 'var(--theme-border)', - borderRadius: '0.5rem', - borderWidth: '1px', - codePaddingBlock: '1rem', - codePaddingInline: '1.25rem', - codeFontFamily: 'var(--font-mono)', - codeFontSize: '0.85rem', - codeLineHeight: '1.7', - uiFontFamily: 'var(--font-body)', - uiFontSize: '0.8rem', - focusBorder: 'var(--theme-link)', - frames: { - frameBoxShadowCssValue: 'none', - editorTabBarBorderBottomColor: 'var(--theme-divider)', - editorActiveTabIndicatorBottomColor: 'var(--theme-link)', - editorActiveTabIndicatorTopColor: 'transparent', - terminalTitlebarBorderBottomColor: 'var(--theme-divider)', - tooltipSuccessBackground: 'var(--theme-link)', - tooltipSuccessForeground: '#fff', - inlineButtonBorder: 'var(--theme-divider)', - inlineButtonForeground: 'var(--theme-text-muted)', - inlineButtonBackgroundIdleOpacity: '0', - inlineButtonBackgroundHoverOrFocusOpacity: '0.08', - }, - }, - }), + astroExpressiveCode(), mdx(), react(), vue(), diff --git a/ec.config.mjs b/ec.config.mjs new file mode 100644 index 0000000000..7c0112c2e9 --- /dev/null +++ b/ec.config.mjs @@ -0,0 +1,41 @@ +import { defineEcConfig } from 'astro-expressive-code'; + +export default defineEcConfig({ + themes: ['github-light', 'github-dark'], + themeCssSelector: (theme) => { + if (theme.name === 'github-light') return ':root:not(.theme-dark)'; + if (theme.name === 'github-dark') return ':root.theme-dark'; + return `[data-theme='${theme.name}']`; + }, + styleOverrides: { + borderColor: 'var(--theme-border)', + borderRadius: '0.5rem', + borderWidth: '1px', + codePaddingBlock: '1rem', + codePaddingInline: '1.25rem', + codeFontFamily: 'var(--font-mono)', + codeFontSize: '0.85rem', + codeLineHeight: '1.7', + uiFontFamily: 'var(--font-body)', + uiFontSize: '0.8rem', + focusBorder: 'var(--theme-link)', + frames: { + frameBoxShadowCssValue: 'none', + editorTabBarBorderBottomColor: 'var(--theme-divider)', + editorActiveTabIndicatorBottomColor: 'var(--theme-link)', + editorActiveTabIndicatorTopColor: 'transparent', + editorTabBarBackground: 'var(--theme-bg-offset)', + editorActiveTabBackground: 'var(--theme-bg-content)', + terminalTitlebarBackground: 'var(--theme-bg-offset)', + terminalTitlebarBorderBottomColor: 'var(--theme-divider)', + terminalTitlebarForeground: 'var(--theme-text-muted)', + terminalTitlebarDotsForeground: 'transparent', + tooltipSuccessBackground: 'var(--theme-text)', + tooltipSuccessForeground: 'var(--theme-bg-content)', + inlineButtonBorder: 'var(--theme-divider)', + inlineButtonForeground: 'var(--theme-text-muted)', + inlineButtonBackgroundIdleOpacity: '0', + inlineButtonBackgroundHoverOrFocusOpacity: '0.08', + }, + }, +}); diff --git a/src/components/BuildkiteCIUploadStep.astro b/src/components/BuildkiteCIUploadStep.astro index 4bd89b35ef..34f261b267 100644 --- a/src/components/BuildkiteCIUploadStep.astro +++ b/src/components/BuildkiteCIUploadStep.astro @@ -1,5 +1,8 @@ --- -import { Code } from 'astro:components'; +import { Code as InlineCode } from 'astro:components'; +import { Code } from 'astro-expressive-code/components'; + +const inlineThemes = { light: 'github-light', dark: 'github-dark' } as const; export interface Props { reportPath: string; @@ -17,7 +20,6 @@ const { reportPath } = Astro.props; report_path: ${reportPath} token: "\${MERGIFY_TOKEN}"`} lang="yaml" - theme="slack-ochin" />

Key Points: