mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2025-05-07 21:16:00 +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:
@ -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 }}
|
||||
|
||||
|
Reference in New Issue
Block a user