Skip to content

Commit cb072ae

Browse files
author
John Letey
committed
dynamic favicon
1 parent 6d3057d commit cb072ae

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/docs/src/components/head.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,30 @@ export default props => {
1919
<Helmet htmlAttributes={{ lang: 'en-US' }}>
2020
<title>{title}</title>
2121
<meta name="description" content={pkg.description} />
22-
<link rel="icon" type="image/png" href="/icon.png" />
22+
<link
23+
rel="icon"
24+
media="(prefers-color-scheme:dark)"
25+
href="/icon-dark.png"
26+
type="image/png"
27+
/>
28+
<link
29+
rel="icon"
30+
media="(prefers-color-scheme:light)"
31+
href="/icon.png"
32+
type="image/png"
33+
/>
2334
<link rel="apple-touch-icon" type="image/png" href="/icon.png" />
2435
<meta name="twitter:card" content="summary" />
2536
<meta name="twitter:site" content="@jxnblk" />
2637
<meta name="twitter:image" content="https://theme-ui.com/card.png" />
2738
<meta name="twitter:title" content={title} />
2839
<meta name="twitter:description" content={pkg.description} />
2940
<meta name="theme-color" content={theme.colors.background} />
41+
<script
42+
src="https://unpkg.com/[email protected]/dist/index.js"
43+
crossOrigin="anonymous"
44+
type="application/javascript"
45+
/>
3046
</Helmet>
3147
)
3248
}

packages/docs/static/icon-dark.png

553 Bytes
Loading

0 commit comments

Comments
 (0)