From 89d351633a2a8bb5fd7e0fe8dd397f7b1c8b7982 Mon Sep 17 00:00:00 2001 From: James Benze Date: Wed, 27 May 2020 11:36:37 -0400 Subject: [PATCH] Fix broken if and statement Updates to hugo 0.71.1 causes a previously allowed-but-wrong construct to now be disallowed. This fixes the template to now compile on 0.71.1 Fixes okkur/syna#773 --- layouts/partials/helpers/fragments-renderer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/helpers/fragments-renderer.html b/layouts/partials/helpers/fragments-renderer.html index 04e4d4c7..39d56db8 100644 --- a/layouts/partials/helpers/fragments-renderer.html +++ b/layouts/partials/helpers/fragments-renderer.html @@ -7,7 +7,7 @@ {{- range sort ($page_scratch.Get "page_fragments" | default slice) "Params.weight" -}} {{/* If a fragment contains a slot variable in it's frontmatter it should not be rendered on the page. It would be later handled by the slot helper. */}} - {{- if (not (isset .Params "slot")) (ne .Params.slot "") -}} + {{- if and (not (isset .Params "slot")) (ne .Params.slot "") -}} {{/* Cleanup .Name to be more useful within fragments */}} {{- $name := cond (eq $page .) .File.BaseFileName (strings.TrimSuffix ".md" (replace .Name "/index.md" "")) -}} {{- $bg := .Params.background | default "light" }}