From c5ab13bf484dfe5afc3b2ed106e23877fc8bb245 Mon Sep 17 00:00:00 2001 From: Huy Tran Date: Mon, 30 Jul 2018 07:23:49 +1000 Subject: [PATCH] revises related post, adds option to enable/disable --- layouts/partials/page-single/post-related.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/page-single/post-related.html b/layouts/partials/page-single/post-related.html index 7f25ce0..2a1f726 100644 --- a/layouts/partials/page-single/post-related.html +++ b/layouts/partials/page-single/post-related.html @@ -1,3 +1,4 @@ +{{ if .Site.Params.relatedPosts }} {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related -}}
@@ -7,4 +8,5 @@ {{ partial "posts-list.html" . }}
-{{- end }} +{{ end }} +{{ end }}