From 0476dd3e7923b1cf7061093d782bd94718900b8c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 22 Oct 2023 19:59:30 +0100 Subject: First pagination - no nav yet --- config.toml | 1 + layouts/stream/list.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 1229cc5..42e4ff3 100644 --- a/config.toml +++ b/config.toml @@ -5,6 +5,7 @@ languageCode = "en-gb" enableInlineShortcodes = true pygmentsCodeFences = true pygmentsUseClasses = true +paginate = 2 [params] description = "An intentionally quiet and unassuming (and empty) blog" diff --git a/layouts/stream/list.html b/layouts/stream/list.html index fd87753..4b384d8 100644 --- a/layouts/stream/list.html +++ b/layouts/stream/list.html @@ -2,7 +2,7 @@ {{ .Content }} -{{ range where site.RegularPages "Section" "stream" }} +{{ range (.Paginate (where site.RegularPages "Section" "stream")).Pages }}

{{ .Date.Format "Monday, 2 January 2006" }}

{{ .Content }} -- cgit v1.2.3