hugo-ataru

Hugo theme with titleless posts and microformats2 support

git clone git://git.shimmy1996.com/hugo-ataru.git
commit 10793079f4ae46296e2ac1b6f40e5dae5d95b008
parent 1e9c7eeaa1fedb608c373e00972c9a68e25d856c
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Fri, 10 Apr 2020 22:17:36 -0500

Content page should only jump to pages in the same section

Diffstat:
Mlayouts/partials/nav_page.html | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/nav_page.html b/layouts/partials/nav_page.html
@@ -5,8 +5,9 @@
   {{ if $pag.HasNext }}<a href="{{ $pag.Next.URL }}">↓</a>{{ else }}↓{{ end }}
 </span>
 {{ else }}
+{{ $pages := where .Site.RegularPages "Section" "==" .Section }}
 <span style="float:right">
-  {{with .Site.RegularPages.Next . }}<a href="{{ .RelPermalink }}">↑</a>{{ else }}↑{{end}}
-  {{with .Site.RegularPages.Prev . }}<a href="{{ .RelPermalink }}">↓</a>{{ else }}↓{{end}}
+  {{with $pages.Next . }}<a href="{{ .RelPermalink }}">↑</a>{{ else }}↑{{end}}
+  {{with $pages.Prev . }}<a href="{{ .RelPermalink }}">↓</a>{{ else }}↓{{end}}
 </span>
 {{ end }}