journalduhacker/app/views/home/rss.erb

26 lines
932 B
Plaintext
Raw Normal View History

2012-07-01 01:42:53 +02:00
<?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>http://lobste.rs/<%= @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>
2012-07-01 01:42:53 +02:00
<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>