lib/awestruct/extensions/sitemap.rb in awestruct-0.5.6.beta8 vs lib/awestruct/extensions/sitemap.rb in awestruct-0.5.6.beta9
- old
+ new
@@ -22,10 +22,15 @@
@excluded_files.merge(site.sitemap.excluded_files)
end
if site.sitemap["excluded_extensions"]
@excluded_extensions.merge(site.sitemap.excluded_extensions)
end
+
+ # Check for a specified stylesheet for the sitemap
+ if site.sitemap["stylesheet_url"]
+ stylesheet_url = site.sitemap["stylesheet_url"]
+ end
end
# Go through all of the site's pages and add sitemap metadata
sitemap_pages = []
entries = site.pages
@@ -48,9 +53,10 @@
sitemap = File.join( File.dirname(__FILE__), 'sitemap.xml.haml' )
page = site.engine.load_page( sitemap )
page.output_path = 'sitemap.xml'
page.sitemap_entries = sitemap_pages
page.do_not_track_dependencies = true
+ page.stylesheet_url = stylesheet_url || nil
# Add the sitemap to our site
site.pages << page
end