From 034ef462a219b207cc5b755ba56a3e19b9e5947a Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Wed, 4 May 2022 22:05:57 -0500 Subject: [PATCH] Make a config option for "Latest Posts" on content pages --- exampleSite/config.yaml | 3 +++ layouts/_default/single.html | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index c000f70..5006abb 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -42,6 +42,9 @@ params: # reddit: true # telegram: true + # show "Latest Posts" section at bottom of content pages + # latestPostsOnContent: true + # footer: >- # Some example text for the footer. diff --git a/layouts/_default/single.html b/layouts/_default/single.html index da7ffbd..b269aa0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -89,5 +89,7 @@ {{ end }} - {{ partialCached "latest-posts.html" . }} + {{ if .Site.Params.latestPostsOnContent }} + {{ partialCached "latest-posts.html" . }} + {{ end }} {{ end }}