jlelse
/
Indieroad
Archived
1
Fork 0

Reverse "postSections" to "ignoredSections"

This commit is contained in:
Jan-Lukas Else 2019-12-25 14:48:31 +01:00
parent 7fd856a2ad
commit b5ec2a9ccf
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) -}}
{{- $pages := ( where $pctx.RegularPages "Type" "not in" $ignoredSections ) -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}

View File

@ -1,6 +1,7 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) -}}
{{- $pages := ( where $pctx.RegularPages "Type" "not in" $ignoredSections ) -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}

View File

@ -5,8 +5,8 @@
{{ . }}
</div>
{{- end }}
{{- $postSections := ($.Param "postSections" | default (slice "posts")) }}
{{- $paginator := .Paginate ( where .Site.RegularPages "Type" "in" $postSections ) }}
{{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) }}
{{- $paginator := .Paginate ( where .Site.RegularPages "Type" "not in" $ignoredSections ) }}
{{- range $paginator.Pages }}
{{- .Render "summary" }}
{{- end }}