Skip to content

Instantly share code, notes, and snippets.

@beef
Created February 6, 2009 16:49
Show Gist options
  • Save beef/59492 to your computer and use it in GitHub Desktop.
Save beef/59492 to your computer and use it in GitHub Desktop.
---
extension: xml
layout: nil
dirty: true
filter: erb
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<% @pages.find(:all ).each do |page| -%>
<url>
<loc><%= server_url_for(page)%></loc>
<lastmod><%= page.mtime.strftime("%Y-%m-%dT%H:%M:%S+00:00") %></lastmod>
<changefreq>monthly</changefreq>
<priority><%= 1.0 - (page.url.split('/').length / 10.0) %></priority>
</url>
<% end -%>
</urlset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment