From 8dee2d1294b1f045621ebb93b1f9407d6fccd5ec Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 29 May 2022 10:36:53 +0200 Subject: Fix default section type for the `params.mainSections` --- layouts/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'layouts/index.html') 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 }}
{{ . }}

- {{- 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) }}
{{ with .Title }}

{{ . }}

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