hugo-theme-relearn/layouts/partials/favicon.html

14 lines
1.2 KiB
HTML
Raw Normal View History

2021-10-30 20:00:46 +00:00
{{- $assetBusting := not .Site.Params.disableAssetsBusting -}}
2021-11-24 11:03:11 +00:00
{{- 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.icon" | 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.icon" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
2021-10-30 20:00:46 +00:00
{{- end }}