fikset favicon

master
Steffen Rafdal 4 weeks ago
parent 28c1b56e5b
commit aa257fe035
  1. 14
      layouts/partials/favicon.html

@ -0,0 +1,14 @@
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
{{- if (fileExists "/static/pix/favicon.svg") }}
<link href="{{ "pix/favicon.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml">
{{- else if (fileExists "/static/pix/favicon.png") }}
<link href="{{ "pix/favicon.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/png">
{{- else if (fileExists "/static/pix/favicon.ico") }}
<link href="{{ "pix/favicon.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/x-icon">
{{- else if (fileExists "/static/pix/logo.svg") }}
<link href="{{ "pix/logo.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/svg+xml">
{{- else if (fileExists "/static/pix/logo.png") }}
<link href="{{ "pix/logo.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/png">
{{- else if (fileExists "/static/pix/logo.ico") }}
<link href="{{ "pix/logo.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" type="image/x-icon">
{{- end }}
Loading…
Cancel
Save