summaryrefslogtreecommitdiff
path: root/lib/ccc_conventions.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-31 18:55:35 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-31 18:55:35 +0200
commit683526b38442a9873d83a542b5cba1d15efc14d5 (patch)
tree5cdf7d762d829d328e3c6437318d20af72bc65bf /lib/ccc_conventions.rb
parent464af1625349d557f688da9f845471ef8b80a5f9 (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 'lib/ccc_conventions.rb')
-rw-r--r--lib/ccc_conventions.rb10
1 files changed, 10 insertions, 0 deletions
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
52 hint: "Automatically created under the Chaostreffs overview page, gets tag \"chaostreff-detail\", and uses the chapter detail template." 52 hint: "Automatically created under the Chaostreffs overview page, gets tag \"chaostreff-detail\", and uses the chapter detail template."
53 } 53 }
54 }.freeze 54 }.freeze
55
56 # Tags whose aggregates are forced into a subtree. Editors may apply any
57 # tag anywhere, but a page tagged "update" outside /updates will never
58 # appear in the front-page widget or the RSS feed, because every aggregate
59 # over that tag is scoped here rather than in the shortcode.
60 TAG_SCOPES = {
61 "update" => "updates",
62 "pressemitteilung" => "updates",
63 "disclosure" => "disclosure"
64 }.freeze
55end 65end