Skip to content

Instantly share code, notes, and snippets.

@judofyr
Created December 14, 2008 20:21
Show Gist options
  • Save judofyr/35788 to your computer and use it in GitHub Desktop.
Save judofyr/35788 to your computer and use it in GitHub Desktop.
---
extension: xml
layout: nil
filter:
- erb
---
<% pages = @pages.find(:limit => 10,
:in_directory => 'posts',
:sort_by => 'created_at',
:reverse => true) -%>
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Magnus Holm</title>
<subtitle>Thoughts on life, internet and programming</subtitle>
<id>tag:judofyr.net,1992-10-15:/</id>
<link rel="self" type="application/atom+xml" href="http://judofyr.net/feed/atom.xml"/>
<link rel="alternate" type="text/html" href="http://judofyr.net/"/>
<updated><%= Time.now.xmlschema %></updated>
<author>
<name>Magnus Holm</name>
<email>[email protected]</email>
<uri>http://judofyr.net</uri>
</author>
<% pages.each do |page|;c=page.created_at.utc%>
<entry>
<title><%= page.title %></title>
<id>tag:judofyr.net,<%=c.xmlschema[0..9]%>:<%=c.to_i%></id>
<link href="http://judofyr.net<%= page.url %>"/>
<updated><%= c.xmlschema %></updated>
<published><%= c.xmlschema %></published>
<content type="html"><![CDATA[<%= Webby::Renderer.new(page)._render_page %>]]></content>
</entry>
<% end -%>
</feed>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment