From 8c718ed668180c853cc9bc61057625a2114a306b Mon Sep 17 00:00:00 2001 From: Philip Mallegol-Hansen Date: Mon, 6 May 2024 10:01:20 -0700 Subject: [PATCH] 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. --- layouts/_default/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5f466c9..c9a53af 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -23,8 +23,8 @@ {{ $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 }}