mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-21 01:52:19 +01: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:
parent
13e1a2977d
commit
acde63b34f
@ -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 }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user