File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11 {{- $assetBusting := not .Site.Params.disableAssetsBusting }}
2- {{- if (fileExists "/static/images/favicon.svg") }}
2+ {{- if or (fileExists "/static/images/favicon-light.svg") (fileExists "/static/images/favicon-dark.svg") }}
3+ {{/*
4+ Warning: IE and old browser versions do not support media queries necessary for the light & dark theme option.
5+ If you have requirements to support IE and/or older browser versions, use one of the other options.
6+ Reference: https://caniuse.com/css-media-interaction
7+ */}}
8+ {{- if (fileExists "/static/images/favicon-light.svg") }}
9+ < link href ="{{ "images /favicon-light.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon " type ="image/svg+xml " media ="(prefers-color-scheme: light) ">
10+ {{- end }}
11+ {{- if (fileExists "/static/images/favicon-dark.svg") }}
12+ < link href ="{{ "images /favicon-dark.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon " type ="image/svg+xml " media ="(prefers-color-scheme: dark) ">
13+ {{- end }}
14+ {{- else if (fileExists "/static/images/favicon.svg") }}
315 < link href ="{{ "images /favicon.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon " type ="image/svg+xml ">
416 {{- else if (fileExists "/static/images/favicon.png") }}
517 < link href ="{{ "images /favicon.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon " type ="image/png ">
You can’t perform that action at this time.
0 commit comments