From 40de4919b834da12cbfc9ce473bae857b646a153 Mon Sep 17 00:00:00 2001 From: JPYamamoto Date: Wed, 23 Oct 2019 21:02:56 -0500 Subject: [PATCH] Added option to disable Read Other Posts --- exampleSite/config.toml | 3 +++ layouts/posts/single.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 902104f..88abce5 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -34,6 +34,9 @@ disableSitemap = false disable404 = false disableHugoGeneratorInject = false +# Set disableReadOtherPosts to true in order to hide the links to other posts. +disableReadOtherPosts = false + [permalinks] posts = "/posts/:year/:month/:title/" diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 441739e..ba610ed 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -56,7 +56,7 @@ {{- end }} - {{ if or .NextInSection .PrevInSection }} + {{ if and (not .Site.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}