Skip to content

Instantly share code, notes, and snippets.

@starflyer59
Created August 28, 2013 21:13
Show Gist options
  • Save starflyer59/6371370 to your computer and use it in GitHub Desktop.
Save starflyer59/6371370 to your computer and use it in GitHub Desktop.
- base_url = "http://#{request.host_with_port}"
!!! XML
%urlset{:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9"}
- @pages_to_visit.each do |page|
%url
%loc #{base_url}#{page[:url]}
- if page[:updated_at].present?
%lastmod= page[:updated_at]
%changefreq= page[:changefreq].present? ? page[:changefreq] : "monthly"
%priority= page[:priority].present? ? page[:priority] : "0.5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment