sass-site/source/sitemap.xml.builder

12 lines
415 B
Plaintext
Raw Normal View History

2013-10-09 12:30:53 +02:00
xml.instruct!
xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
2019-03-04 22:05:31 +01:00
sitemap.resources.select { |page| page.path.end_with?(".html") }.each do |page|
2013-10-09 12:30:53 +02:00
xml.url do
2019-03-04 22:05:31 +01:00
xml.loc "#{data.sitemap.url}/#{page.path.sub(/\.html$/, '')}"
2013-10-09 12:30:53 +02:00
xml.lastmod Date.today.to_time.iso8601
xml.changefreq page.data.changefreq || "monthly"
xml.priority page.data.priority || "0.5"
end
end
end