1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-06-26 16:13:45 +02:00

layouts/_default/baseof.html: Make sidebar logic more robust

Check if the params.sidebar is defined before checking to see if
params.sidebar.hide is true or false. New sites might not have
their config set up properly, so this avoids an error in the case
that params.sidebar isn't defined yet.
This commit is contained in:
Alan Orth 2016-09-22 09:19:20 +03:00
parent 13e1a2977d
commit acde63b34f
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -51,7 +51,7 @@
</div> {{ "<!-- /.blog-main -->" | safeHTML }}
{{ if not .Site.Params.sidebar.hide }}
{{ if and (.Site.Params.sidebar) (not .Site.Params.sidebar.hide) }}
{{ partial "sidebar.html" . }}
{{ end }}