Sha256: 9df7fad4eae1d3ba63e763f68c5c1c3631c43f525ccc164609f559f6d5bea573
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
xml.instruct! xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.title self.title xml.link "rel" => "self", "href" => request.url xml.link "rel" => "alternate", "href" => URI.escape(request.scheme_and_host + self.path) xml.id request.url xml.updated articles.first.published.strftime "%Y-%m-%dT%H:%M:%SZ" if articles.any? xml.summary "" # FIXME: implement xml.author do xml.name site.name end articles.each do |article| xml.entry do xml.title article.title xml.link "rel" => "alternate", "href" => article.path xml.id URI.escape(request.scheme_and_host + article.path) xml.updated article.published.strftime "%Y-%m-%dT%H:%M:%SZ" xml.author { xml.name article.author.name } if !article.author.nil? xml.summary article.content #HTML.new(article.content).to_text # FIXME: implement correctly xml.content "type" => "html" do xml.text! article.content end #unless article.attachment.nil? # xml.link "rel" => "enclosure", "type" => article.attachment.mime_type, "href" => URI.escape(request.scheme_and_host + article.attachment.url.to_s), "length" => article.attachment.length #end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
yodel_blog-0.0.7 | lib/layouts/blog.atom |
yodel_blog-0.0.4 | lib/layouts/blog.atom |
yodel_blog-0.0.2 | lib/layouts/blog.atom |
yodel_blog-0.0.1 | lib/layouts/blog.atom |