diff options
author | Simon Bengtsson <62712116+gevhaz@users.noreply.github.com> | 2022-04-06 01:23:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 01:23:17 +0300 |
commit | 14f85b72b7f8db397972216a54594cede3378741 (patch) | |
tree | 5709171ace9ef68b5d1a8a7eefbb9cae4bbe541e | |
parent | 80916c2ddf43d98c7df2299ae8d6cbd2d488306b (diff) | |
parent | 7bfdba051572027f8ed88e97b85c5f1d76a22e8e (diff) |
Merge pull request #4 from albinahlback/favicon
Add possibility to add favicon
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | exampleSite/static/hugo_grotius.png | bin | 0 -> 17196 bytes | |||
-rw-r--r-- | layouts/partials/head.html | 4 |
4 files changed, 5 insertions, 1 deletions
@@ -49,6 +49,7 @@ paginate = 4 [params] author = "Hugo de Groot" siteHeading = "Hugo Grotius" # defaults to author + favicon = "hugo_grotius.png" # Adds a small icon next to the page title in a tab showBlogLatest = true mainSections = ["blog"] showTaxonomyLinks = false diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9aed064..b7f942a 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -10,6 +10,7 @@ paginate = 4 [params] author = "Hugo de Groot" siteHeading = "Hugo Grotius" # defaults to author + favicon = "hugo_grotius.png" # Adds a small icon next to the page title in a tab showBlogLatest = true mainSections = ["blog"] showTaxonomyLinks = false diff --git a/exampleSite/static/hugo_grotius.png b/exampleSite/static/hugo_grotius.png Binary files differnew file mode 100644 index 0000000..3f28d68 --- /dev/null +++ b/exampleSite/static/hugo_grotius.png diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ad56e1b..5aa6f64 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,7 +7,9 @@ {{ with resources.Get "css/userstyles.css" }} <link rel="stylesheet" type="text/css" href="{{ .Permalink }}"> {{ end }} - <link rel="icon" href={{ "img/icon.png" | absURL }}> + {{ with .Site.Params.favicon }} + <link rel="icon" href="{{ . | absURL }}"> + {{ end }} <meta charset="UTF-8"> <meta name="author" content="{{ .Site.Params.Author }}"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> |