From cd63ec2248eb85aa9f1809d7b681d0beb9f743b9 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 11 Nov 2011 12:27:09 -0800 Subject: [PATCH] expose more data for blog ext --- lib/middleman/base.rb | 2 +- lib/middleman/core_extensions/sitemap.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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