Skip to content

Commit d212c69

Browse files
committed
fix: favicon
Signed-off-by: Innei <[email protected]>
1 parent 3b4f23c commit d212c69

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/app/layout.tsx

+12-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,18 @@ export default async function RootLayout(props: Props) {
148148
<SayHi />
149149
<HydrationEndDetector />
150150

151-
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
151+
<link
152+
rel="shortcut icon"
153+
href={themeConfig.config.site.faviconDark}
154+
type="image/x-icon"
155+
media="(prefers-color-scheme: dark)"
156+
/>
157+
<link
158+
rel="shortcut icon"
159+
href={themeConfig.config.site.favicon}
160+
type="image/x-icon"
161+
media="(prefers-color-scheme: light)"
162+
/>
152163
</head>
153164
<body
154165
className={`${sansFont.variable} ${serifFont.variable} m-0 h-full p-0 font-sans`}

0 commit comments

Comments
 (0)