app/views/news/feed.xml.erb
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Rugby News Board</title>
<description>中文英式橄榄球资讯</description>
<link>http://www.rugbynews.space/</link>
<atom:link href="http://rugby-board.herokuapp.com/news/feed" rel="self" type="application/rss+xml"/>
<generator>RugbyNewsBoard</generator>
<% @news.each do |n| %>
<% cache n do %>
<item>
<title><%= n.title %></title>
<description><![CDATA[<%= raw n.markdown_content %>]]></description>
<pubDate><%= n.created_at.to_s(:rfc822) %></pubDate>
<link><%= "http://www.rugbynews.space/#/news/#{n.id}" %></link>
<guid><%= n.id %></guid>
</item>
<% end %>
<% end %>
</channel>
</rss>