mirror of https://github.com/status-im/consul.git
Add robots.txt and sitemap
This commit is contained in:
parent
b5d5af813a
commit
283c7c1c46
|
@ -2,6 +2,8 @@
|
||||||
# Configure Middleman
|
# Configure Middleman
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
set :base_url, "https://www.consul.io/"
|
||||||
|
|
||||||
activate :hashicorp do |h|
|
activate :hashicorp do |h|
|
||||||
h.version = '0.4.0'
|
h.version = '0.4.0'
|
||||||
h.bintray_repo = 'mitchellh/consul'
|
h.bintray_repo = 'mitchellh/consul'
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
|
---
|
||||||
|
noindex: true
|
||||||
|
---
|
||||||
|
|
||||||
<h2>Page Not Found</h2>
|
<h2>Page Not Found</h2>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
layout: false
|
||||||
|
---
|
||||||
|
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /404
|
||||||
|
Disallow: /500
|
|
@ -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
|
Loading…
Reference in New Issue