From 473add39bd453365ad33bd4f28d9fcfd6786eca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=BCtzner?= Date: Wed, 22 Feb 2023 18:59:35 +0000 Subject: [PATCH] feat: load favicon if configured via params.favicon (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will display a favicon for the website. Favicons are cute little icons that will show up on tabs in your browser, e.g. GitHub's mascot. They can easily be generated by using online tools, e.g. https://realfavicongenerator.net/ The resulting package only has to be downloaded and extracted into the 'static' directory of a Hugo website that is using this theme. The path can then be set as follows in the config.yml: ```yaml params: favicon: favicon.ico ``` This fixes #3. Co-authored-by: Robert Lützner --- layouts/partials/head.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0190cd3..0563f97 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,7 +3,10 @@ + {{ if .Site.Params.favicon }} + + {{ end }} {{ $title := print .Site.Title " | " .Title }} {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} {{ $title }} - \ No newline at end of file +