From 0622836d5cb3076a6e23ed34583655c152403ca3 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 29 May 2022 22:26:59 +0200 Subject: Add pagination support --- layouts/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'layouts/index.html') diff --git a/layouts/index.html b/layouts/index.html index c82855c..70bdad1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,11 +7,15 @@
{{ partial "mini-toc" . }} {{ else }} - {{- $mainSections := site.Params.mainSections | default (slice "posts") }} + {{ $mainSections := site.Params.mainSections | default (slice "posts") }} {{ $paginator := .Paginate (where site.RegularPages.ByDate.Reverse "Section" "in" $mainSections) }}
{{ with .Title }}

{{ . }}

{{ end }} - {{ range $paginator.Pages }}{{- .Render "teaser" }}{{ end }} + + {{ range $paginator.Pages }} + {{ .Render "teaser" }} + {{ end }}
{{ end }} + {{ end }} -- cgit v1.2.3