diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-18 23:01:08 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-18 23:01:08 +0300 |
commit | 8a3f367817a1b20ea49c47113ecec8b78c263719 (patch) | |
tree | 2df9789ffca358928aaf6d34ada9d1706594c988 | |
parent | ff26c66efd958efdb773209ba581c0b20452873c (diff) |
:sparkles: Make sidebar image optional
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/partials/post/sidebar.html | 2 |
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> |