From 683526b38442a9873d83a542b5cba1d15efc14d5 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 31 Jul 2026 18:55:35 +0200 Subject: 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 , and the optional dc:date is omitted. --- lib/ccc_conventions.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/ccc_conventions.rb b/lib/ccc_conventions.rb index b840dee2..52549c9e 100644 --- a/lib/ccc_conventions.rb +++ b/lib/ccc_conventions.rb @@ -52,4 +52,14 @@ module CccConventions hint: "Automatically created under the Chaostreffs overview page, gets tag \"chaostreff-detail\", and uses the chapter detail template." } }.freeze + + # Tags whose aggregates are forced into a subtree. Editors may apply any + # tag anywhere, but a page tagged "update" outside /updates will never + # appear in the front-page widget or the RSS feed, because every aggregate + # over that tag is scoped here rather than in the shortcode. + TAG_SCOPES = { + "update" => "updates", + "pressemitteilung" => "updates", + "disclosure" => "disclosure" + }.freeze end -- cgit v1.3