Corrects readNextPosts logic
The docs at https://gohugo.io/functions/collections/isset/ specify that the isset function must be called with a lowercase representation of the key we wish to check. If we do not, the function always returns false.
This commit is contained in:
parent
a860ae9764
commit
8c718ed668
@ -23,8 +23,8 @@
|
||||
</article>
|
||||
|
||||
{{ $readNextPosts := 3}}
|
||||
{{ if isset .Site.Params "readNextPosts" }}
|
||||
{{ $readNextPosts := .Site.Params.readNextPosts }}
|
||||
{{ if isset .Site.Params "readnextposts" }}
|
||||
{{ $readNextPosts = .Site.Params.readNextPosts }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt $readNextPosts 0 }}
|
||||
|
Loading…
Reference in New Issue
Block a user