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

github.com/vividvilla/ezhil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek R <vividvilla@gmail.com>2019-10-10 09:04:09 +0300
committerGitHub <noreply@github.com>2019-10-10 09:04:09 +0300
commitbe412d7167b230321aa1ecab53f9b2eae8999975 (patch)
treefd3d1bffd40398e804e932f002c3419ab57b0ce0
parent1a6e76206c4e5af8f7b75ab8e6f2fa5c77d408c0 (diff)
parentbb85c2b77fe4fb691f6bab9c82366cb24b779eff (diff)
Merge pull request #16 from directed-graph/master
feat: allow specifying favicon via configuration
-rw-r--r--README.md2
-rw-r--r--layouts/partials/header.html4
2 files changed, 6 insertions, 0 deletions
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>{{ $title }} - {{ $siteTitle }}</title>
{{- end -}}
+ {{- if isset .Site.Params "favicon" -}}
+ <link rel="icon" type="image/png" href={{ .Site.Params.favicon }} />
+ {{- end -}}
+
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}