mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 19:23:12 +00:00
fcb27db2c5
If `favicon.ico` or `logo.ico` exists, `/images/favicon.icon` or `/images/logo.icon` should be `/images/favicon.ico` or `/images/logo.ico`.
14 lines
1.2 KiB
HTML
14 lines
1.2 KiB
HTML
{{- $assetBusting := not .Site.Params.disableAssetsBusting -}}
|
|
{{- if (fileExists "/static/images/favicon.svg") -}}
|
|
<link rel="icon" href="{{ "/images/favicon.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/svg+xml">
|
|
{{- else if (fileExists "/static/images/favicon.png") -}}
|
|
<link rel="icon" href="{{ "/images/favicon.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/png">
|
|
{{- else if (fileExists "/static/images/favicon.ico") -}}
|
|
<link rel="icon" href="{{ "/images/favicon.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
|
|
{{- else if (fileExists "/static/images/logo.svg") -}}
|
|
<link rel="icon" href="{{ "/images/logo.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/svg+xml">
|
|
{{- else if (fileExists "/static/images/logo.png") -}}
|
|
<link rel="icon" href="{{ "/images/logo.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/png">
|
|
{{- else if (fileExists "/static/images/logo.ico") -}}
|
|
<link rel="icon" href="{{ "/images/logo.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
|
|
{{- end }}
|