2011-08-09 22:18:34 +02:00
|
|
|
!!! XML
|
|
|
|
%feed{:xmlns => 'http://www.w3.org/2005/Atom'}
|
|
|
|
%title="zero-knowledge"
|
|
|
|
%subtitle="scripting, programming and administrating"
|
2011-08-11 13:25:04 +02:00
|
|
|
%link{:href => 'http://zero-knowledge.org/'}
|
|
|
|
%link{:type => 'application/atom+xml', :rel => "self", :href => 'http://zero-knowledge.org/atom.xml'}
|
|
|
|
%updated=Post.get_all_released.last.written.xmlschema
|
|
|
|
%id='http://zero-knowledge.org/'
|
2011-08-09 22:18:34 +02:00
|
|
|
-@posts.each do |post|
|
|
|
|
%entry
|
2011-08-11 13:25:04 +02:00
|
|
|
%id="http://zero-knowledge.org/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(/>/, '>')
|