diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-29 10:36:53 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-29 10:37:50 +0200 |
| commit | 8dee2d1294b1f045621ebb93b1f9407d6fccd5ec (patch) | |
| tree | 9f14ac105a2eda5584299555f7ea5edbb562aeee /layouts/index.html | |
| parent | 5e3d262a41a71a95f6333609767e3466a214ead4 (diff) | |
| download | gohugo-theme-ed-8dee2d1294b1f045621ebb93b1f9407d6fccd5ec.tar.gz | |
Fix default section type for the `params.mainSections`
Diffstat (limited to 'layouts/index.html')
| -rw-r--r-- | layouts/index.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/layouts/index.html b/layouts/index.html index d3091c7..c82855c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,17 +1,17 @@ {{ define "main" }} -{{- with .Content }} +{{ with .Content }} <div class="introduction"> {{ . }} </div> <hr> - {{- partial "mini-toc" . -}} -{{- else }} - {{- $mainSections := site.Params.mainSections | default (slice "post") }} - {{ $paginator := .Paginate (where site.RegularPages "Section" "in" $mainSections) }} + {{ partial "mini-toc" . }} +{{ else }} + {{- $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 }} </div> -{{- end }} -{{- end }} +{{ end }} +{{ end }} |
