Feature: Add next and previous page links (#747)

* Rewrite prev-next with enw lang. selector
* Make sure next page stays on right side
* Align icon styles
This commit is contained in:
Alex Shpak
2025-07-31 23:18:41 +02:00
committed by GitHub
parent 92579b2c72
commit 9181135505
8 changed files with 67 additions and 4 deletions
@@ -0,0 +1,14 @@
{{ $scratch := newScratch }}
{{ template "recurse" (dict "Scratch" $scratch "Sections" .) }}
{{ define "recurse" }}
{{ range .Sections }}
{{ if and .Content (not .Params.BookHidden) }}
{{ $.Scratch.Add "BookPages" (slice .) }}
{{ end }}
{{ if .IsSection }}
{{ template "recurse" (dict "Scratch" $.Scratch "Sections" .Pages) }}
{{ end }}
{{ end }}
{{ end }}
{{ return $scratch.Get "BookPages" }}