diff options
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/list.atom.xml | 3 | ||||
| -rw-r--r-- | layouts/_default/list.feed.xml | 3 | ||||
| -rw-r--r-- | layouts/_default/list.json.json | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index b3b375d..bd1f982 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -3,7 +3,8 @@ {{- $pages := slice -}} {{- if $.IsHome -}} - {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections -}} + {{- $mainSections := site.Params.mainSections | default (slice "post") }} + {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" $mainSections -}} {{- else if $.IsSection -}} {{- $pages = $pctx.RegularPages.ByDate.Reverse -}} {{- else -}} diff --git a/layouts/_default/list.feed.xml b/layouts/_default/list.feed.xml index 0a37e09..87d62cc 100644 --- a/layouts/_default/list.feed.xml +++ b/layouts/_default/list.feed.xml @@ -3,7 +3,8 @@ {{- $pages := slice -}} {{- if $.IsHome -}} - {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections -}} + {{- $mainSections := site.Params.mainSections | default (slice "post") }} + {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" $mainSections -}} {{- else if $.IsSection -}} {{- $pages = $pctx.RegularPages.ByDate.Reverse -}} {{- else -}} diff --git a/layouts/_default/list.json.json b/layouts/_default/list.json.json index bfcb852..308bd96 100644 --- a/layouts/_default/list.json.json +++ b/layouts/_default/list.json.json @@ -3,7 +3,8 @@ {{- $pages := slice -}} {{- if $.IsHome -}} - {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections -}} + {{- $mainSections := site.Params.mainSections | default (slice "post") }} + {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" $mainSections -}} {{- else if $.IsSection -}} {{- $pages = $pctx.RegularPages.ByDate.Reverse -}} {{- else -}} |
