diff options
| -rw-r--r-- | app/views/rss/updates.rdf.builder | 18 | ||||
| -rw-r--r-- | app/views/rss/updates.xml.builder | 4 |
2 files changed, 15 insertions, 7 deletions
diff --git a/app/views/rss/updates.rdf.builder b/app/views/rss/updates.rdf.builder index 699e9c87..496fb108 100644 --- a/app/views/rss/updates.rdf.builder +++ b/app/views/rss/updates.rdf.builder | |||
| @@ -2,17 +2,25 @@ xml.instruct! | |||
| 2 | xml.tag!("rdf:RDF", "xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns" => "http://purl.org/rss/1.0/") do | 2 | xml.tag!("rdf:RDF", "xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns" => "http://purl.org/rss/1.0/") do |
| 3 | xml.tag!( "rdf:Description", "rdf:about" => "http://www.w3.org/TR/rdf-syntax-grammar", "dc:title"=>"RDF/XML Syntax Specification (Revised)") | 3 | xml.tag!( "rdf:Description", "rdf:about" => "http://www.w3.org/TR/rdf-syntax-grammar", "dc:title"=>"RDF/XML Syntax Specification (Revised)") |
| 4 | 4 | ||
| 5 | xml.channel( "rdf:about" => "https://www.ccc.de/de/rss/updates.xml" ) do | 5 | xml.channel( "rdf:about" => rss_feed_url(:format => "rdf")) do |
| 6 | xml.title("Chaos Computer Club: Updates") | 6 | xml.title("Chaos Computer Club: Updates") |
| 7 | xml.link("https://www.ccc.de") | 7 | xml.link("#{@host}") |
| 8 | xml.description("Kabelsalat ist gesund.") | 8 | xml.description("Kabelsalat ist gesund.") |
| 9 | xml.tag!("dc:date", @items.first&.published_at&.xmlschema) if @items.any? | 9 | xml.tag!("dc:date", @items.first&.published_at&.xmlschema) if @items.any? |
| 10 | xml.items do | ||
| 11 | xml.tag!("rdf:Seq") do | ||
| 12 | @items.each do |item| | ||
| 13 | xml.tag!("rdf:li", "rdf:resource" => content_url(:page_path => item.node.unique_path)) | ||
| 14 | end | ||
| 15 | end | ||
| 16 | end | ||
| 17 | xml.image("rdf:resource" => "#{@host}/images/chaosknoten.gif") | ||
| 10 | end | 18 | end |
| 11 | 19 | ||
| 12 | xml.image( "rdf:about" => "https://www.ccc.de/images/chaosknoten.gif") do | 20 | xml.image( "rdf:about" => "#{@host}/images/chaosknoten.gif") do |
| 13 | xml.title("Chaos Computer Club (Chaosknoten)") | 21 | xml.title("Chaos Computer Club (Chaosknoten)") |
| 14 | xml.link("https://www.ccc.de") | 22 | xml.link("#{@host}") |
| 15 | xml.url("https://www.ccc.de/images/chaosknoten.gif") | 23 | xml.url("#{@host}/images/chaosknoten.gif") |
| 16 | end | 24 | end |
| 17 | 25 | ||
| 18 | @items.each do |item| | 26 | @items.each do |item| |
diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index f09d6a74..f5cad621 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder | |||
| @@ -2,13 +2,13 @@ xml.instruct! | |||
| 2 | 2 | ||
| 3 | xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do | 3 | 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 => "#{@host}") |
| 6 | xml.link(:rel => "self", :href => "#{@host}/rss/updates.xml") | 6 | xml.link(:rel => "self", :href => "#{@host}/rss/updates.xml") |
| 7 | xml.updated((@items.map(&:updated_at).compact.max || Time.now).xmlschema) | 7 | xml.updated((@items.map(&:updated_at).compact.max || 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 |
| 11 | xml.id("https://www.ccc.de/rss/updates") | 11 | xml.id("#{@host}/rss/updates") |
| 12 | 12 | ||
| 13 | @items.each do |item| | 13 | @items.each do |item| |
| 14 | xml.entry do | 14 | xml.entry do |
