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:
Philip Mallegol-Hansen 2024-05-06 10:01:20 -07:00
parent a860ae9764
commit 8c718ed668
No known key found for this signature in database

View File

@ -23,8 +23,8 @@
</article> </article>
{{ $readNextPosts := 3}} {{ $readNextPosts := 3}}
{{ if isset .Site.Params "readNextPosts" }} {{ if isset .Site.Params "readnextposts" }}
{{ $readNextPosts := .Site.Params.readNextPosts }} {{ $readNextPosts = .Site.Params.readNextPosts }}
{{ end }} {{ end }}
{{ if gt $readNextPosts 0 }} {{ if gt $readNextPosts 0 }}