Skip to content

Commit

Permalink
Feeds: Check feed-exclude parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Jul 15, 2024
1 parent 9ad25f3 commit f6487b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions layouts/feeds/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $sc := site.GetPage "/statecollege/_index.md" -}}
{{- $stories := union $news.RegularPages $sc.RegularPages -}}
{{- $stories = sort $stories ".PublishDate" "desc" -}}
{{- $stories = where $stories `Params.feed-exclude` "ne" true -}}
{{- range first 15 $stories -}}
{{- $date := .Date.Format "2006-01-02T15:04:05Z07:00" -}}
{{- $item := dict
Expand All @@ -22,8 +23,8 @@
"absURL" true
-}}
{{- $url := partial "helper/imgproxy" $imgOpt -}}
{{ $description := .Param "image-description" }}
{{ $credit := .Param "image-credit" }}
{{- $description := .Param "image-description" -}}
{{- $credit := .Param "image-credit" -}}
{{- $item = $item | merge (dict
"image" $url
"image_description" $description
Expand Down
3 changes: 2 additions & 1 deletion layouts/feeds/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{{- $sc := site.GetPage "/statecollege/_index.md" -}}
{{- $stories := union $news.RegularPages $sc.RegularPages -}}
{{- $stories = sort $stories ".PublishDate" "desc" -}}
{{ $description := (site.GetPage "/_index.md").Description }}
{{- $stories = where $stories `Params.feed-exclude` "ne" true -}}
{{- $description := (site.GetPage "/_index.md").Description -}}
<rss
version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
Expand Down

0 comments on commit f6487b7

Please sign in to comment.