Skip to content

Commit 60bf1aa

Browse files
ConorOkusclaude
andcommitted
fix(vitepress): use one-dark-pro for code blocks in both themes
Code blocks render on a dark navy background (--vp-code-block-bg) in both light and dark mode, but VitePress's default Shiki themes (github-light/ github-dark) have muted tokens tuned for light backgrounds, leaving identifiers nearly invisible. Pin one-dark-pro for both modes so syntax stays legible on the navy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cdec158 commit 60bf1aa

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ export default defineConfig({
141141

142142
markdown: {
143143
lineNumbers: false,
144+
// Code blocks use a dark navy background in BOTH light and dark mode
145+
// (--vp-code-block-bg is dark in :root and .dark alike), so both Shiki
146+
// themes must be dark-on-navy. github-light/github-dark have muted tokens
147+
// that disappear on the navy; one-dark-pro stays high-contrast and legible.
148+
theme: {
149+
light: 'one-dark-pro',
150+
dark: 'one-dark-pro',
151+
},
144152
},
145153

146154
themeConfig: {

0 commit comments

Comments
 (0)