2022-02-06 12:51:54 +00:00
|
|
|
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
2023-06-01 20:37:33 +00:00
|
|
|
{{- if or (fileExists "/static/images/favicon-light.svg") (fileExists "/static/images/favicon-dark.svg") }}
|
|
|
|
{{/*
|
|
|
|
Warning: IE and old browser versions do not support media queries necessary for the light & dark theme option.
|
|
|
|
If you have requirements to support IE and/or older browser versions, use one of the other options.
|
|
|
|
Reference: https://caniuse.com/css-media-interaction
|
|
|
|
*/}}
|
|
|
|
{{- if (fileExists "/static/images/favicon-light.svg") }}
|
|
|
|
<link href="{{ "images/favicon-light.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml" media="(prefers-color-scheme: light)">
|
|
|
|
{{- end }}
|
|
|
|
{{- if (fileExists "/static/images/favicon-dark.svg") }}
|
|
|
|
<link href="{{ "images/favicon-dark.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml" media="(prefers-color-scheme: dark)">
|
|
|
|
{{- end }}
|
|
|
|
{{- else if (fileExists "/static/images/favicon.svg") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/favicon.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- else if (fileExists "/static/images/favicon.png") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/favicon.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/png">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- else if (fileExists "/static/images/favicon.ico") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/favicon.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/x-icon">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- else if (fileExists "/static/images/logo.svg") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/logo.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- else if (fileExists "/static/images/logo.png") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/logo.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/png">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- else if (fileExists "/static/images/logo.ico") }}
|
2022-07-07 19:42:45 +00:00
|
|
|
<link href="{{ "images/logo.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/x-icon">
|
2022-02-06 12:51:54 +00:00
|
|
|
{{- end }}
|