fix: remove section filter in rss.xml
This commit is contained in:
parent
9dbc0a4f38
commit
d455336d57
@ -6,12 +6,10 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $pages = $pctx.Pages -}}
|
{{- $pages = $pctx.Pages -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $pages := where $pages "Type" "in" .Site.Params.mainSections -}}
|
{{- $pages := where $pages "Params.hidden" "!=" true -}}
|
||||||
{{- $notHidden := where $pages "Params.hidden" "!=" true -}}
|
|
||||||
{{- $filtered := ($pages | intersect $notHidden) -}}
|
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $filtered = $filtered | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
@ -28,7 +26,7 @@
|
|||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range $filtered }}
|
{{ range $pages }}
|
||||||
{{- $content := safeHTML (.Summary | html) -}}
|
{{- $content := safeHTML (.Summary | html) -}}
|
||||||
{{- if .Site.Params.rssFullContent -}}
|
{{- if .Site.Params.rssFullContent -}}
|
||||||
{{- $content = safeHTML (.Content | html) -}}
|
{{- $content = safeHTML (.Content | html) -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user