diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index 976dbf6a..93c65d66 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -80,7 +80,7 @@ module Middleman::Base app.set :default_features, [ :lorem, - #:sitemap_tree + :sitemap_tree ] # Default layout name diff --git a/lib/middleman/features/sitemap_tree.rb b/lib/middleman/features/sitemap_tree.rb index 3decb117..6ca52e01 100644 --- a/lib/middleman/features/sitemap_tree.rb +++ b/lib/middleman/features/sitemap_tree.rb @@ -10,7 +10,7 @@ module Middleman::Features::SitemapTree def sitemap_tree(regex=nil) @sitemap_tree_cache = {} - key = regex.nil? "all" : regex + key = regex.nil? ? "all" : regex if !@sitemap_tree_cache.has_key?(key) auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc }