Commit 6efc86f2 authored by Seth Vargo's avatar Seth Vargo

Add sitemap

parent 9767b893
......@@ -2,6 +2,8 @@
# Configure Middleman
#-------------------------------------------------------------------------
set :base_url, "https://www.packer.io/"
activate :hashicorp do |h|
h.version = '0.7.1'
h.bintray_repo = 'mitchellh/packer'
......
---
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment