Hello, I have a strange problem, I use a frontmatter value of true
here is an example
url: postgresql/2015/01/27/-Anyone-using-the-Activate-persistence-framework.html
myurl: postgresql/2015/01/27/-Anyone-using-the-Activate-persistence-framework.html
nickname: shinobi
noindex: true
For some reason this does work
{{ $paginator := .Paginate (where .Data.Pages “Params.noindex” “true” ) }}
or this
{{ $paginator := .Paginate (where .Data.Pages “Params.noindex” true )}}
but when I change my front matter to
nickname: shinobi
noindex: "true"
it does work, is this a bug?
Looks like 0.13 by the paginator.
And it looks like true/false is treated as a string, which it is when the Go parser is finished with it.
Bug? Maybe. But what to do with the string “true”? I would call it a bug if this was a result of another func that returns bool.
I would just work around this by using 0 and 1 as bools.
If you do a print "#v" .Params, you should see that
noindex = "true"is stored as a string.
noindex = true` doesn’t look like it is. That’s a guess because in one instance it’s printed with quotes and in another it is not.
I tried with noindex = 0
and {{ $paginator := .Paginate (where .Data.Pages "Params.noindex" 0 ) }}
and couldn’t get it working, either. This is with 0.14 from yesterday’s spf13/master.
I tested this with 0.13 and 0.14