Add a sitemap.xml for the docs.

This commit is contained in:
Chris Eppstein 2011-04-28 20:44:47 -07:00
parent b107017960
commit 92ce8c6dbf
6 changed files with 16 additions and 2 deletions

View File

@ -18,5 +18,6 @@ gem 'json'
gem 'css_parser', "1.0.1" gem 'css_parser', "1.0.1"
gem 'ruby-prof' gem 'ruby-prof'
gem 'rb-fsevent' gem 'rb-fsevent'
gem 'builder'

View File

@ -8,7 +8,7 @@ GIT
PATH PATH
remote: .. remote: ..
specs: specs:
compass (0.11.1.26f44fd) compass (0.11.1.9f3ca16)
chunky_png (~> 1.1) chunky_png (~> 1.1)
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.1) sass (~> 3.1)
@ -17,6 +17,7 @@ GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
activesupport (3.0.7) activesupport (3.0.7)
builder (2.1.2)
chunky_png (1.1.1) chunky_png (1.1.1)
coderay (0.9.7) coderay (0.9.7)
compass-susy-plugin (0.9.beta.3) compass-susy-plugin (0.9.beta.3)
@ -49,6 +50,7 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
builder
coderay coderay
compass! compass!
compass-susy-plugin (>= 0.7.0.pre8) compass-susy-plugin (>= 0.7.0.pre8)

View File

@ -57,6 +57,10 @@ compile "/blog/atom/" do
filter :haml, :attr_wrapper => '"' filter :haml, :attr_wrapper => '"'
end end
compile 'sitemap' do
filter :erb
end
compile '*' do compile '*' do
if item[:extension] == "markdown" if item[:extension] == "markdown"
filter :rdiscount filter :rdiscount
@ -66,6 +70,10 @@ compile '*' do
layout item[:layout] ? item[:layout] : "main" layout item[:layout] ? item[:layout] : "main"
end end
route 'sitemap' do
item.identifier.chop + '.xml'
end
route "/blog/atom/" do route "/blog/atom/" do
"/blog/atom.xml" "/blog/atom.xml"
end end

View File

@ -6,5 +6,6 @@ data_sources:
- items_root: /assets - items_root: /assets
layouts_root: /assets layouts_root: /assets
type: filesystem_assets type: filesystem_assets
text_extensions: [ 'css', 'erb', 'haml', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'php', 'rb', 'sass', 'scss', 'txt' ] text_extensions: [ 'css', 'erb', 'haml', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'php', 'rb', 'sass', 'scss', 'txt', 'xml' ]
output_dir: output output_dir: output
base_url: http://compass-style.org

View File

@ -0,0 +1 @@
<%= xml_sitemap %>

View File

@ -5,6 +5,7 @@ include Nanoc3::Helpers::LinkTo
include Nanoc3::Helpers::Capturing include Nanoc3::Helpers::Capturing
include Nanoc3::Helpers::Rendering include Nanoc3::Helpers::Rendering
include Nanoc3::Helpers::Breadcrumbs include Nanoc3::Helpers::Breadcrumbs
include Nanoc3::Helpers::XMLSitemap
def body_class(item) def body_class(item)
classes = [""] classes = [""]