Skip to content

Commit

Permalink
Fix broken if and statement
Browse files Browse the repository at this point in the history
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 #773
  • Loading branch information
Houndie authored May 27, 2020
1 parent 5bbd985 commit 89d3516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/helpers/fragments-renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down

0 comments on commit 89d3516

Please sign in to comment.