mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-05-21 11:05:49 +00:00
Allow certain pages to be excluded from RSS feed (#1833)
* Allow certain pages to be excluded from RSS feed This line adds support for the possibility to exclude a certain page from the RSS feed by adding a param to the front matter: ``` --- hiddenInRss: true --- ``` --------- Co-authored-by: Gerrit Beine <mail@gerritbeine.com> Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
{{- else }}
|
||||
{{- $pages = $pctx.Pages }}
|
||||
{{- end }}
|
||||
{{- $pages = where $pages "Params.hiddenInRss" "!=" true -}}
|
||||
{{- $limit := site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $pages = $pages | first $limit }}
|
||||
|
||||
Reference in New Issue
Block a user