From 9541ca0059a990a49a93810da68fb7bde51a2ac6 Mon Sep 17 00:00:00 2001 From: tdharris Date: Thu, 8 Aug 2024 15:09:03 -0600 Subject: [PATCH] fix(theme)!: auto or dark, no light --- blog.tsx | 2 +- types.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blog.tsx b/blog.tsx index 5bf0f7e..8f5c9fd 100644 --- a/blog.tsx +++ b/blog.tsx @@ -104,7 +104,7 @@ function errorHandler(err: unknown) { */ export default async function blog(settings?: BlogSettings) { html.use(UnoCSS(settings?.unocss)); // Load custom unocss module if provided - html.use(ColorScheme("dark")); + html.use(ColorScheme(settings?.theme || "auto")); const url = callsites()[1].getFileName()!; const blogState = await configureBlog(url, IS_DEV, settings); diff --git a/types.d.ts b/types.d.ts index 694be92..6f6c42b 100644 --- a/types.d.ts +++ b/types.d.ts @@ -66,7 +66,7 @@ export interface BlogSettings { /** UnoCSS configuration */ unocss?: UnoConfig; /** Color scheme */ - theme?: "dark" | "light" | "auto"; + theme?: "dark" | "auto"; /** * URL to favicon. Can be relative. * Supports dark and light mode variants through "prefers-color-scheme".