quoid
1
My front matters looks like this:
Post0.md
---
title: "I am a title"
isEdit: 0
---
I am post zero!
Post1.md
---
title: "I am a title"
isEdit: 1
---
I am post one! My isEdit value is 1!
{{ $pages := where (where .Site.RegularPages "Type" "posts") ".Params.isEdit" "!=" 1 }}
{{ range (.Paginate $pages).Pages }}
{{ .Title }}
{{ end }}
The above range does not properly filter out posts that have isEdit: 1
. However, if I change isEdit
to isedit
, it works as expected.
{{ $pages := where (where .Site.RegularPages "Type" "posts") ".Params.isedit" "!=" 1 }}
In my template, whilst “ranging”, if I have:
{{ if eq .Params.isEdit 1}}<span>Ok</span>{{ end }}
The span element will render properly.
This isn’t a huge deal for me, as I can change the frontmatter to be all lowercase, but I thought I would see if this is a known issue.
I found these threads, but they seem to suggest this was an older bug that was resolved:
Which version are you running? Type hugo version
.
quoid
3
Sorry, I forgot to include that.
hugo v0.82.1+extended darwin/amd64
system
Closed
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.