summaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index de93078..b90d3db 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -6,11 +6,14 @@
{{ $faviconPath := (.Site.Params.faviconPath | default "" | absURL) }}
+{{ $faviconIco := urls.JoinPath $faviconPath "favicon.ico" }}
+{{ if fileExists $faviconIco }}
<link rel="icon" type="image/ico" href="{{ urls.JoinPath $faviconPath "favicon.ico" }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ urls.JoinPath $faviconPath "favicon-16x16.png" }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ urls.JoinPath $faviconPath "favicon-32x32.png" }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ urls.JoinPath $faviconPath "android-chrome-192x192.png" }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ urls.JoinPath $faviconPath "apple-touch-icon.png" }}">
+{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}