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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-18 23:01:08 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-18 23:01:08 +0300
commit8a3f367817a1b20ea49c47113ecec8b78c263719 (patch)
tree2df9789ffca358928aaf6d34ada9d1706594c988
parentff26c66efd958efdb773209ba581c0b20452873c (diff)
:sparkles: Make sidebar image optional
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/post/sidebar.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index f23c683..a56d309 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -75,4 +75,4 @@ theme = "../.."
[params.sidebar]
enabled = true
- image = "images/pic09.jpg" \ No newline at end of file
+ \ No newline at end of file
diff --git a/layouts/partials/post/sidebar.html b/layouts/partials/post/sidebar.html
index f2feb9a..203043a 100644
--- a/layouts/partials/post/sidebar.html
+++ b/layouts/partials/post/sidebar.html
@@ -1,6 +1,8 @@
<!-- Sidebar -->
<section class="box">
+ {{ if .Site.Params.Sidebar.image }}
<a href="#" class="image featured"><img src="{{ .Site.BaseURL }}{{ .Site.Params.Sidebar.image }}" alt="" /></a>
+ {{ end }}
<header>
<h3>Sed etiam lorem nulla</h3>
</header>