Fix Prev/Next navigator was not pointing to the actual prev/next article (#348)

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
Emruz Hossain 2021-06-06 21:43:34 +06:00 committed by GitHub
parent 929a78837a
commit 61e5a34171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 28 deletions

View file

@ -0,0 +1,10 @@
{{ $pages:= slice}}
{{ range . }}
{{ if .HasChildren }}
{{ $nestedPages:=partial "helpers/get-pages.html" .Children }}
{{ $pages = $pages | append $nestedPages }}
{{ else }}
{{ $pages = $pages | append .Page }}
{{ end }}
{{ end }}
{{ return $pages}}