From b8cea6f36b696ae7efd9f967a0980275e7b08cb0 Mon Sep 17 00:00:00 2001 From: nanxiaobei Date: Tue, 15 Aug 2023 04:41:30 +0800 Subject: [PATCH] add disablePostNavigation param --- README.md | 1 + layouts/_default/single.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index ab9450a..8b59c7b 100755 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ disqusShortname = 'YOUR_DISQUS_SHORTNAME' # use disqus comments # misc disableHLJS = true # disable highlight.js + disablePostNavigation = true # disable post navigation monoDarkIcon = true # show monochrome dark mode icon gravatarCdn = 'GRAVATAR_CDN_LINK' # e.g. 'https://cdn.v2ex.com/gravatar/' graphCommentId = "YOUR_GRAPH_COMMENT_ID" # use graph comment (disqus alternative) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index da2f2b1..14dc536 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -35,6 +35,7 @@ {{ end }} + {{ if not site.Params.disablePostNavigation }} {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ if and (gt (len $pages) 1) (in $pages . ) }} + {{ end }} {{ end }}