diff --git a/doc-src/Gemfile b/doc-src/Gemfile index 5b880cc3..184436c3 100644 --- a/doc-src/Gemfile +++ b/doc-src/Gemfile @@ -18,5 +18,6 @@ gem 'json' gem 'css_parser', "1.0.1" gem 'ruby-prof' gem 'rb-fsevent' +gem 'builder' diff --git a/doc-src/Gemfile.lock b/doc-src/Gemfile.lock index 14cfbefa..ed22dd15 100644 --- a/doc-src/Gemfile.lock +++ b/doc-src/Gemfile.lock @@ -8,7 +8,7 @@ GIT PATH remote: .. specs: - compass (0.11.1.26f44fd) + compass (0.11.1.9f3ca16) chunky_png (~> 1.1) fssm (>= 0.2.7) sass (~> 3.1) @@ -17,6 +17,7 @@ GEM remote: http://rubygems.org/ specs: activesupport (3.0.7) + builder (2.1.2) chunky_png (1.1.1) coderay (0.9.7) compass-susy-plugin (0.9.beta.3) @@ -49,6 +50,7 @@ PLATFORMS ruby DEPENDENCIES + builder coderay compass! compass-susy-plugin (>= 0.7.0.pre8) diff --git a/doc-src/Rules b/doc-src/Rules index c5ba8d9e..ee84cd46 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -57,6 +57,10 @@ compile "/blog/atom/" do filter :haml, :attr_wrapper => '"' end +compile 'sitemap' do + filter :erb +end + compile '*' do if item[:extension] == "markdown" filter :rdiscount @@ -66,6 +70,10 @@ compile '*' do layout item[:layout] ? item[:layout] : "main" end +route 'sitemap' do + item.identifier.chop + '.xml' +end + route "/blog/atom/" do "/blog/atom.xml" end diff --git a/doc-src/config.yaml b/doc-src/config.yaml index 4474c339..e5ca40b8 100644 --- a/doc-src/config.yaml +++ b/doc-src/config.yaml @@ -6,5 +6,6 @@ data_sources: - items_root: /assets layouts_root: /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 +base_url: http://compass-style.org diff --git a/doc-src/content/sitemap.xml b/doc-src/content/sitemap.xml new file mode 100644 index 00000000..63691eb2 --- /dev/null +++ b/doc-src/content/sitemap.xml @@ -0,0 +1 @@ +<%= xml_sitemap %> diff --git a/doc-src/lib/default.rb b/doc-src/lib/default.rb index a2a5c782..9067c5c6 100644 --- a/doc-src/lib/default.rb +++ b/doc-src/lib/default.rb @@ -5,6 +5,7 @@ include Nanoc3::Helpers::LinkTo include Nanoc3::Helpers::Capturing include Nanoc3::Helpers::Rendering include Nanoc3::Helpers::Breadcrumbs +include Nanoc3::Helpers::XMLSitemap def body_class(item) classes = [""]