feat: Add public RSS feed for conferences
Users currently have no way to be notified when new conferences are published on an OSEM instance. This adds an RSS 2.0 feed endpoint at /feed.rss that lists all conferences ordered by creation date. The feed action is excluded from CanCanCan authorization so it remains publicly accessible without authentication, similar to the existing calendar endpoint. Also adds an RSS subscribe link to the conferences index page and an auto-discovery <link> tag in the application layout so RSS readers can detect the feed automatically. Fixes #3543
This commit is contained in:
parent
9ff37fe106
commit
1958ac2b10
5 changed files with 32 additions and 1 deletions
18
app/views/conferences/feed.rss.builder
Normal file
18
app/views/conferences/feed.rss.builder
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
xml.instruct! :xml, version: "1.0"
|
||||
xml.rss version: "2.0" do
|
||||
xml.channel do
|
||||
xml.title "#{ENV.fetch('OSEM_NAME', 'OSEM')} - Conferences"
|
||||
xml.description "Conferences from #{ENV.fetch('OSEM_NAME', 'OSEM')}"
|
||||
xml.link conferences_url
|
||||
|
||||
@conferences.each do |conference|
|
||||
xml.item do
|
||||
xml.title conference.title
|
||||
xml.description conference.description
|
||||
xml.pubDate conference.created_at.to_fs(:rfc822)
|
||||
xml.link conference_url(conference.short_title)
|
||||
xml.guid conference_url(conference.short_title)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue