From 91547594d8e11bcf72470decd641c8e8a12f2eb4 Mon Sep 17 00:00:00 2001
From: mountainbug95 <tannersmithtn95@gmail.com>
Date: Wed, 03 Jun 2020 20:13:35 +0000
Subject: [PATCH] Add site logo option

---
 exampleSite/config.toml               |    1 +
 layouts/partials/site-navigation.html |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 8ff63d0..9f83574 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -18,6 +18,7 @@
 
 [params]
   favicon = ""
+  site_logo = ""
   description = "The last theme you'll ever need. Maybe."
   facebook = ""
   twitter = "https://twitter.com/GoHugoIO"
diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html
index fc6f40c..d73c66d 100644
--- a/layouts/partials/site-navigation.html
+++ b/layouts/partials/site-navigation.html
@@ -1,7 +1,11 @@
 <nav class="pv3 ph3 ph4-ns" role="navigation">
   <div class="flex-l justify-between items-center center">
     <a href="{{ .Site.Home.RelPermalink }}" class="f3 fw2 hover-white no-underline white-90 dib">
-      {{ .Site.Title }}
+      {{ with .Site.Params.site_logo }}
+        <img src="{{ . }}" class="w100 mw5-ns" alt="{{ $.Site.Title }}" />
+      {{ else }}
+        {{ .Site.Title }}
+      {{ end }}
     </a>
     <div class="flex-l items-center">
       {{ partial "i18nlist.html" . }}

--
Gitblit v1.10.0