generated from nhcarrigan/template
feat: enable dark theme and theme switcher
This commit is contained in:
@ -2,17 +2,18 @@ import { defineConfig } from 'astro/config';
|
||||
import starlight from "@astrojs/starlight";
|
||||
import { ExpressiveCodeTheme } from "@astrojs/starlight/expressive-code"
|
||||
import themeJson from "./src/styles/theme.json"
|
||||
import darkThemeJson from "./src/styles/theme-dark.json"
|
||||
|
||||
import { navigation } from "./src/components/navigation.ts";
|
||||
|
||||
const sakuraDreams = ExpressiveCodeTheme.fromJSONString(JSON.stringify(themeJson));
|
||||
const sakuraDreamsDark = ExpressiveCodeTheme.fromJSONString(JSON.stringify(darkThemeJson));
|
||||
|
||||
export default defineConfig({
|
||||
site: "https://docs.nhcarrigan.com",
|
||||
integrations: [starlight({
|
||||
components: {
|
||||
Footer: "./src/components/Footer.astro",
|
||||
ThemeSelect: "./src/components/ThemeSelect.astro",
|
||||
ThemeProvider: "./src/components/ThemeProvider.astro",
|
||||
},
|
||||
title: "NHCarrigan Docs",
|
||||
@ -69,7 +70,7 @@ export default defineConfig({
|
||||
"./src/fonts/font-face.css"
|
||||
],
|
||||
expressiveCode: {
|
||||
themes: [sakuraDreams]
|
||||
themes: [sakuraDreams, sakuraDreamsDark],
|
||||
}
|
||||
}),
|
||||
]
|
||||
|
Reference in New Issue
Block a user