2011-08-09 22:18:34 +02:00
|
|
|
!!! XML
|
|
|
|
%feed{:xmlns => 'http://www.w3.org/2005/Atom'}
|
2011-09-29 19:48:59 +02:00
|
|
|
%title=title
|
|
|
|
%subtitle=subtitle
|
|
|
|
%link{:href => domain}
|
|
|
|
%link{:type => 'application/atom+xml', :rel => "self", :href => domain('/atom.xml')}
|
2011-08-11 13:25:04 +02:00
|
|
|
%updated=Post.get_all_released.last.written.xmlschema
|
2011-09-29 19:48:59 +02:00
|
|
|
%id=domain
|
2011-08-09 22:18:34 +02:00
|
|
|
-@posts.each do |post|
|
|
|
|
%entry
|
2011-09-29 19:48:59 +02:00
|
|
|
%id=domain("/post/#{post.id}")
|
2011-08-09 22:18:34 +02:00
|
|
|
%link{:type => 'text/html', :rel => "alternate", :href => "/post/#{post.id}"}
|
|
|
|
%title=post.title
|
2011-08-11 13:25:04 +02:00
|
|
|
%updated=post.written.xmlschema
|
2011-08-09 22:18:34 +02:00
|
|
|
%author
|
|
|
|
%name=post.account.username
|
2011-08-11 13:25:04 +02:00
|
|
|
%summary{:type => 'html'}=markup(post.content, post.markup).match(/.*?<\/p>/m)[0].gsub(/</, '<').gsub(/>/, '>')
|
|
|
|
%content{:type => 'html'}=markup(post.content, post.markup).gsub(/</, '<').gsub(/>/, '>')
|