From 893f4a77a49f8785486be649b96fb830b8691057 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Fri, 26 Apr 2024 12:46:52 +0800 Subject: [PATCH] update: "rssIcon" defaults to "true" && "readNextPosts" defaults to "3" --- layouts/_default/single.html | 9 +++++++-- layouts/partials/social-icons.html | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) 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 }}