From acde63b34fd6d7d05a85a804830067d0cceb2516 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 22 Sep 2016 09:19:20 +0300 Subject: [PATCH] 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. --- layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index db2f195..ff5416e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -51,7 +51,7 @@ {{ "" | safeHTML }} - {{ if not .Site.Params.sidebar.hide }} + {{ if and (.Site.Params.sidebar) (not .Site.Params.sidebar.hide) }} {{ partial "sidebar.html" . }} {{ end }}