mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 12:52:47 +00:00
Add sitemap and robots.txt
This commit is contained in:
parent
99ad0e30a1
commit
221f23197a
15 changed files with 35 additions and 5 deletions
13
Rules
13
Rules
|
@ -10,7 +10,7 @@ compile '*/json/' do
|
|||
filter :erb
|
||||
end
|
||||
|
||||
compile %r{/(technical|personal|)articles/(page/|)} do
|
||||
compile %r{/(?:technical|personal|)articles/(page/|)} do
|
||||
filter :erb
|
||||
layout 'articles'
|
||||
end
|
||||
|
@ -25,6 +25,10 @@ compile %r{.*/feed/} do
|
|||
filter :erb
|
||||
end
|
||||
|
||||
compile %r{(?:/robots/|/sitemap)} do
|
||||
filter :erb
|
||||
end
|
||||
|
||||
compile '*' do
|
||||
filter :rdiscount
|
||||
layout 'default'
|
||||
|
@ -40,6 +44,13 @@ route %r{.*/feed/} do
|
|||
path.cleanpath.to_s + '.xml'
|
||||
end
|
||||
|
||||
route '/robots/' do
|
||||
'/robots.txt'
|
||||
end
|
||||
|
||||
route '/sitemap/' do
|
||||
'/sitemap.xml'
|
||||
end
|
||||
|
||||
route '*' do
|
||||
item.identifier + 'index.html'
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: A New Item
|
||||
is_hidden: true
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: All Articles
|
||||
title: All Articles
|
||||
is_hidden: true
|
||||
|
|
|
@ -3,4 +3,4 @@ title: WezM.net - All Articles
|
|||
author_name: Wesley Moore
|
||||
author_uri: http://www.wezm.net/about/
|
||||
#feed_url: http://feeds.feedburner.com/wezm/
|
||||
|
||||
is_hidden: true
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: A New Item
|
||||
is_hidden: true
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: Personal Articles
|
||||
is_hidden: true
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
title: WezM.net - Personal Articles
|
||||
author_name: Wesley Moore
|
||||
author_uri: http://www.wezm.net/about/
|
||||
|
||||
is_hidden: true
|
||||
|
|
6
content/robots.txt
Normal file
6
content/robots.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
|
||||
#
|
||||
# To ban all spiders from the entire site uncomment the next two lines:
|
||||
User-Agent: *
|
||||
Disallow:
|
||||
Sitemap: <%= @site.config[:base_url] %>/sitemap.xml
|
2
content/robots.yaml
Normal file
2
content/robots.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
title: A New Item
|
1
content/sitemap.xml
Normal file
1
content/sitemap.xml
Normal file
|
@ -0,0 +1 @@
|
|||
<%= xml_sitemap %>
|
2
content/sitemap.yaml
Normal file
2
content/sitemap.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
title: A New Item
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: A New Item
|
||||
is_hidden: true
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
title: Technical Articles
|
||||
is_hidden: true
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
title: WezM.net - Technical Articles
|
||||
author_name: Wesley Moore
|
||||
author_uri: http://www.wezm.net/about/
|
||||
is_hidden: true
|
||||
|
|
|
@ -5,4 +5,5 @@ require 'json'
|
|||
|
||||
include Nanoc3::Helpers::Rendering
|
||||
include Nanoc3::Helpers::Blogging
|
||||
include WezM::Helpers::Articles
|
||||
include Nanoc3::Helpers::XMLSitemap
|
||||
include WezM::Helpers::Articles
|
||||
|
|
Loading…
Reference in a new issue