From 1266dd4287e2d2d2ec015f39ba32bc9d14079d14 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 20 Oct 2023 10:23:38 +0200 Subject: [PATCH] fix condition to determine next-prev entry for filetree (#724) --- layouts/partials/menu-filetree-np.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/partials/menu-filetree-np.html b/layouts/partials/menu-filetree-np.html index 972a5f0..8c50969 100644 --- a/layouts/partials/menu-filetree-np.html +++ b/layouts/partials/menu-filetree-np.html @@ -56,9 +56,9 @@ {{ $name := $current.Scratch.Get "refName" }} {{ if $current.Scratch.Get "getNext" }} - {{ if $this.Content }} - {{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }} - {{ $current.Scratch.Set "getNext" false }} + {{ if or $this.Content $this.Params.geekdocFlatSection }} + {{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }} + {{ $current.Scratch.Set "getNext" false }} {{ end }} {{ end }} @@ -67,8 +67,8 @@ {{ $current.Scratch.Set "getNext" true }} {{ end }} - {{ if $this.Content }} - {{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }} + {{ if or $this.Content $this.Params.geekdocFlatSection }} + {{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }} {{ end }} {{ $sub := and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}