Skip to content

Commit

Permalink
fix(theme)!: auto or dark, no light
Browse files Browse the repository at this point in the history
  • Loading branch information
tdharris committed Aug 8, 2024
1 parent b2fe716 commit 9541ca0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down

0 comments on commit 9541ca0

Please sign in to comment.