diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 84767f1..164e5cc 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -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 diff --git a/layouts/partials/archive.html b/layouts/partials/archive.html index b63bc39..fc7d6bd 100644 --- a/layouts/partials/archive.html +++ b/layouts/partials/archive.html @@ -11,7 +11,7 @@ {{ .Content }} -{{ range $pages }} +{{- range (.Paginate $pages).Pages }} {{- $postDate := .Date.Format "2006-01-02" }} {{- $updateDate := .Lastmod.Format "2006-01-02" }}
@@ -27,4 +27,5 @@
-{{ end }} \ No newline at end of file +{{ end }} +{{- template "_internal/pagination.html" . }} \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 729eb86..bf8ea8a 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -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; +}