journalduhacker/app/views/home/rss.erb
2012-08-24 10:57:11 -05:00

26 lines
928 B
Plaintext

<?xml version="1.0" encoding="UTF-8" ?>
<% coder = HTMLEntities.new %>
<rss version="2.0">
<channel>
<title>lobste.rs<%= @page_title ? ": " + h(@page_title) : "" %></title>
<description><%= @page_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><%= story.comments_url %></guid>
<author><%= story.user.username %></author>
<pubDate><%= story.created_at.rfc2822 %></pubDate>
<comments><%= story.comments_url %></comments>
<description><%= raw coder.encode(story.linkified_text, :decimal)
%></description>
<% story.tags.each do |tag| %>
<category><%= tag.tag %></category>
<% end %>
</item>
<% end %>
</channel>
</rss>