terraform/website/source/sitemap.xml.builder

20 lines
476 B
Plaintext
Raw Normal View History

2014-10-22 05:20:21 +02:00
---
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