Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <github@jimmycai.com>2022-03-05 20:11:48 +0300
committerGitHub <noreply@github.com>2022-03-05 20:11:48 +0300
commitd455336d579da37139ef4efe3f9060871a62b94d (patch)
treef15b5c5a0f4cf9fa24d1ee1a76ac2454f8fee0b8
parent9dbc0a4f38b7afc81925cd15006287deb2e6ca41 (diff)
fix: remove section filter in rss.xml
-rw-r--r--layouts/_default/rss.xml8
1 files changed, 3 insertions, 5 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 4934bd0..e9f3f1a 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -6,12 +6,10 @@
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
-{{- $pages := where $pages "Type" "in" .Site.Params.mainSections -}}
-{{- $notHidden := where $pages "Params.hidden" "!=" true -}}
-{{- $filtered := ($pages | intersect $notHidden) -}}
+{{- $pages := where $pages "Params.hidden" "!=" true -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
-{{- $filtered = $filtered | first $limit -}}
+{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
@@ -28,7 +26,7 @@
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
- {{ range $filtered }}
+ {{ range $pages }}
{{- $content := safeHTML (.Summary | html) -}}
{{- if .Site.Params.rssFullContent -}}
{{- $content = safeHTML (.Content | html) -}}