Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gevhaz/hugo-theme-notrack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Bengtsson <62712116+gevhaz@users.noreply.github.com>2022-04-06 01:23:17 +0300
committerGitHub <noreply@github.com>2022-04-06 01:23:17 +0300
commit14f85b72b7f8db397972216a54594cede3378741 (patch)
tree5709171ace9ef68b5d1a8a7eefbb9cae4bbe541e
parent80916c2ddf43d98c7df2299ae8d6cbd2d488306b (diff)
parent7bfdba051572027f8ed88e97b85c5f1d76a22e8e (diff)
Merge pull request #4 from albinahlback/favicon
Add possibility to add favicon
-rw-r--r--README.md1
-rw-r--r--exampleSite/config.toml1
-rw-r--r--exampleSite/static/hugo_grotius.pngbin0 -> 17196 bytes
-rw-r--r--layouts/partials/head.html4
4 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 812c580..7b01e3c 100644
--- a/README.md
+++ b/README.md
@@ -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
new file mode 100644
index 0000000..3f28d68
--- /dev/null
+++ b/exampleSite/static/hugo_grotius.png
Binary files differ
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">