implement basic pagination

This commit is contained in:
John Bowdre 2023-11-13 10:05:14 -06:00
parent 5af0ab3937
commit 5457716248
3 changed files with 16 additions and 3 deletions

View file

@ -2,7 +2,7 @@ baseURL = "https://runtimeterror.dev"
theme = "risotto"
title = "runtimeterror"
copyright = "© 2018-2023 [runtimeterror](https://runtimeterror.dev)"
paginate = 3
paginate = 10
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true

View file

@ -11,7 +11,7 @@
{{ .Content }}
</header>
{{ range $pages }}
{{- range (.Paginate $pages).Pages }}
{{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
<article class="post">
@ -27,4 +27,5 @@
</section>
<br>
</article>
{{ end }}
{{ end }}
{{- template "_internal/pagination.html" . }}

View file

@ -156,4 +156,16 @@ body.dark .notice {
position: relative;
}
/* pagination overrides */
ul.pagination li::marker {
content:'';
}
ul.pagination li {
margin: 0 0.25rem;
}
.pagination {
display:flex;
justify-content: center;
}