diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-29 22:26:59 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-29 22:26:59 +0200 |
| commit | 0622836d5cb3076a6e23ed34583655c152403ca3 (patch) | |
| tree | 2154e9befa4bc5fa09bca3f19b4c2e4e0661c591 /layouts/index.html | |
| parent | e10cd65cab6cfcd60f09885aa00f9bb876ca4d1e (diff) | |
| download | gohugo-theme-ed-0622836d5cb3076a6e23ed34583655c152403ca3.tar.gz | |
Add pagination support
Diffstat (limited to 'layouts/index.html')
| -rw-r--r-- | layouts/index.html | 8 |
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 }} |
