From f19c71fb6e680fde42a26731db23b2a2a97dde36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sapka?= Date: Sat, 21 Jan 2023 22:13:03 +0100 Subject: feat: pagination --- layouts/_default/list.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'layouts/_default/list.html') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b709bd7c..8ad2c034 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,17 +1,16 @@ {{ define "main" }} -{{- range where .Site.RegularPages "Params.category" "!=" "pages"}} +{{ $paginator := (.Paginator.Pages) }}. +{{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }} +{{ range $paginator.Pages }}

{{ .Page.Title }}

({{ .PublishDate.Format "January 2nd, 2006" }})
- {{ .Page.Summary }} + {{ .Page.Content }}
- {{- if .Page.Truncated }} - More - - {{ end }}
{{ end }} + {{ template "_internal/pagination.html" . }} {{ end }} -- cgit v1.2.3