Add previous and next page links

Fix #33
This commit is contained in:
2021-11-14 00:41:49 -06:00
parent f6140abc26
commit e67bd58ceb
2 changed files with 77 additions and 0 deletions

View File

@ -52,6 +52,36 @@
</div>
{{ end }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
&larr; Newer
</div>
<div class="prev-post">
{{ .Title }}
</div>
</a>
{{ else }}
<div class="prev"></div>
{{ end }}
{{ with .PrevInSection }}
<a class="next" href="{{ .Permalink }}">
<div class="next-caption">
Older &rarr;
</div>
<div class="next-post">
{{ .Title }}
</div>
</a>
{{ else }}
<div class="next"></div>
{{ end }}
</div>
{{ end }}
{{ if .Params.comments }}
{{ partial "comments.html" . }}
{{ end }}