mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
fix(rss): hide private/unlisted pages in RSS feed
This commit is contained in:
1 parent
9b2f6809f3
commit
87a8fc714e
1 file changed
+1
@@ -2,6 +2,7 @@
|
||||
{{- /* Upstream Hugo bug - RSS dates can be in future: https://github.com/gohugoio/hugo/issues/3918 */ -}}
|
||||
{{- $page_context := cond .IsHome site . -}}
|
||||
{{- $pages := $page_context.RegularPages -}}
|
||||
{{- $pages = where $pages "Params.private" "!=" true -}}
|
||||
{{- $limit := site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
|
||||
Reference in new issue
Block a user