From c92ccbb613aa5dca6de05c1366fa6f2e8153116f Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Wed, 30 Nov 2011 21:35:30 -0800 Subject: [PATCH] Trim down frontmatter data storage by not storing the source of the template after stripping frontmatter in the local_data hash. --- lib/middleman/core_extensions/front_matter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleman/core_extensions/front_matter.rb b/lib/middleman/core_extensions/front_matter.rb index 28c662fe..86f2cfce 100644 --- a/lib/middleman/core_extensions/front_matter.rb +++ b/lib/middleman/core_extensions/front_matter.rb @@ -25,7 +25,7 @@ module Middleman::CoreExtensions::FrontMatter relative_path = path.sub(source_dir, "") data = if frontmatter.has_data?(relative_path) - frontmatter.data(relative_path).first + frontmatter.data(relative_path) else {} end @@ -78,7 +78,7 @@ module Middleman::CoreExtensions::FrontMatter if result file = file.sub(@app.source_dir, "") - @local_data[file] = result + @local_data[file] = result[0] path = File.join(@app.source_dir, file) @app.cache.set([:raw_template, path], result[1]) end