small fixes

This commit is contained in:
teldra 2022-03-28 12:56:55 +02:00
parent 32b0a14b66
commit 534cb4e33e
1 changed files with 3 additions and 3 deletions

View File

@ -18,15 +18,15 @@
{{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }}
{{ $meta := "false" }}
{{- if eq .Section "events" -}}
{{- $paginator = .Paginate (where site.RegularPages.ByLastmod.Reverse ".Params.when" "ne" nil) -}}
{{- $paginator = .Paginate (where site.RegularPages.ByDate.Reverse ".Params.when" "ne" nil) -}}
{{- else if eq .Section "news" }}
{{- $paginator = .Paginate (where (where .Site.RegularPages.ByLastmod.Reverse "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.mainSections) }}
{{- $paginator = .Paginate (where (where .Site.RegularPages.ByDate.Reverse "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.mainSections) }}
{{- else if eq .Section "featured" }}
{{- $paginator = .Paginate (where $posts "Params.featured" true) -}}
{{- else if eq .Section "recurrent" }}
{{- $paginator = .Paginate (where .Site.RegularPages "Params.recurrent" true) -}}
{{- else -}}
{{- $paginator = .Paginate .RegularPagesRecursive.ByLastmod.Reverse -}}
{{- $paginator = .Paginate .RegularPagesRecursive.ByDate.Reverse -}}
{{- end -}}
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}