From ea69ed14c2a3ee6d1b7921a63e33f8d7f385fa0c Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Tue, 31 Dec 2019 09:09:33 +0100 Subject: [PATCH] Revert ignoredSections --- layouts/_default/list.jsonfeed.json | 3 +-- layouts/_default/rss.xml | 3 +-- layouts/index.html | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/layouts/_default/list.jsonfeed.json b/layouts/_default/list.jsonfeed.json index 2f2765b..3701b00 100644 --- a/layouts/_default/list.jsonfeed.json +++ b/layouts/_default/list.jsonfeed.json @@ -1,7 +1,6 @@ {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) -}} -{{- $pages := ( where $pctx.RegularPages "Type" "not in" $ignoredSections ) -}} +{{- $pages := $pctx.RegularPages -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 8085140..5f064d3 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,7 +1,6 @@ {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) -}} -{{- $pages := ( where $pctx.RegularPages "Type" "not in" $ignoredSections ) -}} +{{- $pages := $pctx.RegularPages -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} diff --git a/layouts/index.html b/layouts/index.html index b9392c1..ba31917 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,8 +5,8 @@ {{ . }} {{- end }} - {{- $ignoredSections := ($.Param "ignoredSections" | default (slice "ignored")) }} - {{- $paginator := .Paginate ( where .Site.RegularPages "Type" "not in" $ignoredSections ) }} + {{- $postSections := ($.Param "postSections" | default (slice "posts")) }} + {{- $paginator := .Paginate ( where .Site.RegularPages "Type" "in" $postSections ) }} {{- range $paginator.Pages }} {{- .Render "summary" }} {{- end }}