From 1e37db6cefa9a27372559049afc46918ce39c258 Mon Sep 17 00:00:00 2001
From: Adam Kaplan <akaplan@findyr.com>
Date: Wed, 27 Sep 2017 11:52:26 +0000
Subject: [PATCH] Favicons (#54)

---
 exampleSite/config.toml            |    1 +
 layouts/_default/baseof.html       |    3 +++
 layouts/partials/site-favicon.html |    3 +++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index bdf4375..d61ed05 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -17,6 +17,7 @@
   filename = "sitemap.xml"
 
 [params]
+  favicon = ""
   description = "The last theme you'll ever need. Maybe."
   facebook = ""
   twitter = "https://twitter.com/GoHugoIO"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 1a59233..577940a 100755
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -18,6 +18,9 @@
     {{ end }}
 
     <link href='{{ "dist/main.css" | absURL }}' rel='stylesheet' type="text/css" />
+    {{ block "favicon" . }}
+      {{ partial "site-favicon.html" . }}
+    {{ end }}
 
     {{ if .RSSLink }}
       <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
diff --git a/layouts/partials/site-favicon.html b/layouts/partials/site-favicon.html
new file mode 100644
index 0000000..ffb9642
--- /dev/null
+++ b/layouts/partials/site-favicon.html
@@ -0,0 +1,3 @@
+{{ if .Site.Params.favicon }}
+<link rel="shortcut icon" href="/{{ .Site.Params.favicon }}" type="image/x-icon" />
+{{ end }}
\ No newline at end of file

--
Gitblit v1.10.0