Fix: Blog posts' Next/Prev showing service entries.

This commit is contained in:
hyzen
2026-03-02 17:40:27 +05:30
parent 7f62e0927d
commit 4238c571a6
7 changed files with 77 additions and 10 deletions

View File

@@ -1,11 +1,15 @@
{{- $pages := where site.RegularPages "Section" "ne" "" -}} {{- /* exclude non-section pages, e.g. /content/about.md */ -}}
{{ if or ($pages.Next .) ($pages.Prev .) }}
{{ if or .NextInSection .PrevInSection }}
<nav class="page-nav">
{{- with $pages.Next . }}
<a class="page-nav__previous-link" href="{{ .RelPermalink }}">{{ i18n "previousPage" }}{{.Title}}</a>
{{- end }}
{{- with $pages.Prev . }}
<a class="page-nav__next-link" href="{{ .RelPermalink }}">{{ i18n "nextPage" }}{{.Title}}</a>
{{- end }}
{{ with .NextInSection }}
<a class="page-nav__previous-link" href="{{ .RelPermalink }}">
{{ i18n "previousPage" }}{{ .Title }}
</a>
{{ end }}
{{ with .PrevInSection }}
<a class="page-nav__next-link" href="{{ .RelPermalink }}">
{{ i18n "nextPage" }}{{ .Title }}
</a>
{{ end }}
</nav>
{{ end }}
{{ end }}