oh ye, we have an atom feed, too :)

This commit is contained in:
jomo
2014-04-08 00:49:38 +02:00
parent b0504467e1
commit 2d68cbf358

View File

@@ -0,0 +1,17 @@
atom_feed do |feed|
feed.title "Redstoner News"
feed.updated Time.now
@posts.each do |post|
feed.entry post do |entry|
entry.updated post.updated_at
entry.author do |a|
a.name post.author.name
a.uri user_url(post.author)
end
entry.url blogpost_url(post)
entry.title post.title
entry.content Sanitize.clean(GitHub::Markdown.render_gfm(post.content), Sanitize::Config::RELAXED).html_safe, :type => 'html'
end
end
end