1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Fix next/prev links to be same-section

next/prev links for posts shouldn't navigate to non-post pages like
"about" and "resume".
This commit is contained in:
Rohan Kumar 2022-01-05 16:00:09 -08:00
parent 82036d0df9
commit db0d16e5b5
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -24,9 +24,9 @@
</div>
<hr>
<p>
{{- if .Prev -}}<a href="{{ .Prev.Permalink }}">Previous</a>{{- end -}}
{{- if and (.Prev) (.Next) }} · {{ end -}}
{{- if .Next -}}<a href="{{ .Next.Permalink }}">Next</a>{{- end -}}
{{- if .PrevInSection -}}<a href="{{ .PrevInSection.Permalink }}">Previous</a>{{- end -}}
{{- if and (.PrevInSection) (.NextInSection) }} · {{ end -}}
{{- if .NextInSection -}}<a href="{{ .NextInSection.Permalink }}">Next</a>{{- end -}}
</p>
<hr>
<footer class="comment">