Skip to content

Instantly share code, notes, and snippets.

@jacegu
Created April 26, 2011 21:08
Show Gist options
  • Save jacegu/943156 to your computer and use it in GitHub Desktop.
Save jacegu/943156 to your computer and use it in GitHub Desktop.
The HAML code of the blog RSS feed
!!! XML
%rss(version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom")
%channel
%title Javier Acero's blog
%link #{url('blog/rss')}
%atom:link(href="#{url('blog/rss')}"
rel="self"
type="application/rss+xml")
%description
This is where Javier Acero records what he learns
about software development and where he reflects
about his long road.
%language en-US
%lastBuildDate #{@posts[0].utc_publication_time.to_rfc822}
%webMaster j4cegu@gmail.com (Javier Acero)
%managingEditor j4cegu@gmail.com (Javier Acero)
-@posts.each do |post|
%item
%title #{post.title}
%link #{url('blog/'+ post.url)}
%description #{post.description}
%author j4cegu@gmail.com (Javier Acero)
%pubDate #{post.utc_publication_time.to_rfc822}
%guid(isPermaLink='true') #{url('blog/'+ post.url)}
%comments #{url('blog/' + post.url + '#disqus_thread')}
%content:encoded <![CDATA[#{post.render_body}]]>
@nfedyashev
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment