diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 243751e..5f466c9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,8 +22,13 @@ - {{ if gt .Site.Params.readNextPosts 0 }} - {{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }} + {{ $readNextPosts := 3}} + {{ if isset .Site.Params "readNextPosts" }} + {{ $readNextPosts := .Site.Params.readNextPosts }} + {{ end }} + + {{ if gt $readNextPosts 0 }} + {{ $related := .Site.RegularPages.Related . | first $readNextPosts }} {{ with $related }}