31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<% coder = HTMLEntities.new %>
|
|
<rss version="2.0">
|
|
<channel>
|
|
<title>lobste.rs<%= @title.present? ? ": " + h(@title) : "" %></title>
|
|
<description><%= @title %></description>
|
|
<link><%= root_url + (@newest ? "newest" : "") %></link>
|
|
|
|
<% @stories.each do |story| %>
|
|
<item>
|
|
<title><%= raw coder.encode(story.title, :decimal) %></title>
|
|
<link><%= story.url_or_comments_url %></link>
|
|
<guid isPermaLink="false"><%= story.short_id_url %></guid>
|
|
<author><%= story.user.username %></author>
|
|
<pubDate><%= story.created_at.rfc2822 %></pubDate>
|
|
<comments><%= story.comments_url %></comments>
|
|
<% if story.markeddown_description.present? %>
|
|
<description><%= raw coder.encode(story.markeddown_description,
|
|
:decimal) %></description>
|
|
<% else %>
|
|
<description><%= cdata_section(link_to("Comments",
|
|
story.comments_url)) %></description>
|
|
<% end %>
|
|
<% story.taggings.each do |tagging| %>
|
|
<category><%= tagging.tag.tag %></category>
|
|
<% end %>
|
|
</item>
|
|
<% end %>
|
|
</channel>
|
|
</rss>
|