summaryrefslogtreecommitdiffstats
path: root/layouts/index.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-29 22:26:59 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-29 22:26:59 +0200
commit0622836d5cb3076a6e23ed34583655c152403ca3 (patch)
tree2154e9befa4bc5fa09bca3f19b4c2e4e0661c591 /layouts/index.html
parente10cd65cab6cfcd60f09885aa00f9bb876ca4d1e (diff)
downloadgohugo-theme-ed-0622836d5cb3076a6e23ed34583655c152403ca3.tar.gz
Add pagination support
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html8
1 files changed, 6 insertions, 2 deletions
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 @@
<hr>
{{ 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) }}
<div class="articles">
{{ with .Title }}<h1 class="page-title">{{ . }}</h1>{{ end }}
- {{ range $paginator.Pages }}{{- .Render "teaser" }}{{ end }}
+
+ {{ range $paginator.Pages }}
+ {{ .Render "teaser" }}
+ {{ end }}
</div>
{{ end }}
+
{{ end }}