Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
---
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>judofyr@gmail.com</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