diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 18:55:35 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 18:55:35 +0200 |
| commit | 683526b38442a9873d83a542b5cba1d15efc14d5 (patch) | |
| tree | 5cdf7d762d829d328e3c6437318d20af72bc65bf /app/views/rss | |
| parent | 464af1625349d557f688da9f845471ef8b80a5f9 (diff) | |
Bind aggregates over scoped tags to their subtree
CccConventions::TAG_SCOPES maps "update" and "pressemitteilung" to /updates
and "disclosure" to /disclosure. Page.aggregate applies the mapping, so an
aggregate over one of those tags is bounded by its subtree regardless of what
the shortcode says. Tags stay unrestricted; positions are publish-gated.
Both RSS actions call Page.aggregate rather than repeating its tag join.
Empty feeds no longer crash: Atom falls back to the current time for the
required <updated>, and the optional dc:date is omitted.
Diffstat (limited to 'app/views/rss')
| -rw-r--r-- | app/views/rss/updates.rdf.builder | 2 | ||||
| -rw-r--r-- | app/views/rss/updates.xml.builder | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/rss/updates.rdf.builder b/app/views/rss/updates.rdf.builder index b02d34ff..b4fecdb0 100644 --- a/app/views/rss/updates.rdf.builder +++ b/app/views/rss/updates.rdf.builder | |||
| @@ -6,7 +6,7 @@ xml.tag!("rdf:RDF", "xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |||
| 6 | xml.title("Chaos Computer Club: Updates") | 6 | xml.title("Chaos Computer Club: Updates") |
| 7 | xml.link("https://www.ccc.de") | 7 | xml.link("https://www.ccc.de") |
| 8 | xml.description("Kabelsalat ist gesund.") | 8 | xml.description("Kabelsalat ist gesund.") |
| 9 | xml.tag!("dc:date", @items.first.published_at.xmlschema) | 9 | xml.tag!("dc:date", @items.first&.published_at&.xmlschema) if @items.any? |
| 10 | end | 10 | end |
| 11 | 11 | ||
| 12 | xml.image( "rdf:about" => "https://www.ccc.de/images/chaosknoten.gif") do | 12 | xml.image( "rdf:about" => "https://www.ccc.de/images/chaosknoten.gif") do |
diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 27845c4c..f261de89 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder | |||
| @@ -4,7 +4,7 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do | |||
| 4 | xml.title("Chaos Computer Club Updates") | 4 | xml.title("Chaos Computer Club Updates") |
| 5 | xml.link(:href => "https://www.ccc.de/") | 5 | xml.link(:href => "https://www.ccc.de/") |
| 6 | xml.link(:rel => "self", :href => "#{@host}/rss/updates.xml") | 6 | xml.link(:rel => "self", :href => "#{@host}/rss/updates.xml") |
| 7 | xml.updated(@items.first.published_at.xmlschema) | 7 | xml.updated((@items.first&.published_at || Time.now).xmlschema) |
| 8 | xml.author do | 8 | xml.author do |
| 9 | xml.name("Chaos Computer Club e.V.") | 9 | xml.name("Chaos Computer Club e.V.") |
| 10 | end | 10 | end |
