From bb85c2b77fe4fb691f6bab9c82366cb24b779eff Mon Sep 17 00:00:00 2001 From: Travis Chen Date: Wed, 9 Oct 2019 16:53:10 -0700 Subject: feat: allow specifying favicon via configuration We assume PNG MIME type, because, from my understanding, PNG is the main format for favicons nowadays (even if they have an "ico" extension). Further configuration options are needed to allow for specifying different MIME types. --- README.md | 2 ++ layouts/partials/header.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 41bb39e..64c31f2 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ paginate = 10 disableDisqusTypes = ["page"] # If social media links are enabled then enable this to fetch icons from CDN instead of hosted on your site. featherIconsCDN = true + # Specify favicon (icons/i.png maps to static/icons/i.png). No favicon if not defined. + favicon = "icons/myicon.png" # Main menu which appears below site header. [[menu.main]] diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 273c6cc..9f8913a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -9,6 +9,10 @@ {{ $title }} - {{ $siteTitle }} {{- end -}} + {{- if isset .Site.Params "favicon" -}} + + {{- end -}} + {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} -- cgit v1.2.3