Trim down frontmatter data storage by not storing the source of the template after stripping frontmatter in the local_data hash.

This commit is contained in:
Ben Hollis 2011-11-30 21:35:30 -08:00
parent d08b825607
commit c92ccbb613

View file

@ -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