Add sitemap

This commit is contained in:
Seth Vargo 2014-10-21 23:20:21 -04:00
parent 0474da5507
commit fe6e7e2a01
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
layout: false
---
xml.instruct!
xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
sitemap
.resources
.select { |page| page.path =~ /\.html/ }
.select { |page| !page.data.noindex }
.each do |page|
xml.url do
xml.loc File.join(base_url, page.url)
xml.lastmod Date.today.to_time.iso8601
xml.changefreq page.data.changefreq || "monthly"
xml.priority page.data.priority || "0.5"
end
end
end