reenable sitemap tree

This commit is contained in:
Thomas Reynolds 2011-11-08 15:47:53 -08:00
parent 271961bf8c
commit d72200dc5e
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ module Middleman::Base
app.set :default_features, [ app.set :default_features, [
:lorem, :lorem,
#:sitemap_tree :sitemap_tree
] ]
# Default layout name # Default layout name

View file

@ -10,7 +10,7 @@ module Middleman::Features::SitemapTree
def sitemap_tree(regex=nil) def sitemap_tree(regex=nil)
@sitemap_tree_cache = {} @sitemap_tree_cache = {}
key = regex.nil? "all" : regex key = regex.nil? ? "all" : regex
if !@sitemap_tree_cache.has_key?(key) if !@sitemap_tree_cache.has_key?(key)
auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc } auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc }