jlelse
/
Indieroad
Archived
1
Fork 0

Revert ignoredSections

This commit is contained in:
Jan-Lukas Else 2019-12-31 09:09:33 +01:00
parent 47975f6702
commit ea69ed14c2
3 changed files with 4 additions and 6 deletions

View File

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

View File

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

View File

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