diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index fbb039ce..ed380a04 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -79,7 +79,7 @@ module Middleman::Base app.register Middleman::CoreExtensions::FrontMatter app.set :default_features, [ - # :lorem, + :lorem, # :sitemap_tree ] diff --git a/lib/middleman/core_extensions/sitemap.rb b/lib/middleman/core_extensions/sitemap.rb index 9832ae67..87898dea 100644 --- a/lib/middleman/core_extensions/sitemap.rb +++ b/lib/middleman/core_extensions/sitemap.rb @@ -43,6 +43,7 @@ module Middleman::CoreExtensions::Sitemap @app = app @source = File.expand_path(@app.views, @app.root) @map = {} + @source_map = {} @ignored_paths = false @generic_paths = false @proxied_paths = false @@ -155,6 +156,10 @@ module Middleman::CoreExtensions::Sitemap @map.delete(path) if path_exists?(path) end + def source_map + @source_map + end + protected def build_static_map Find.find(@source) do |file| @@ -182,6 +187,7 @@ module Middleman::CoreExtensions::Sitemap end end + @source_map[path] = file path end