Merge pull request #906 from adamesque/master

Make sure Frontmatter data is actually cached
This commit is contained in:
Thomas Reynolds 2013-05-23 13:35:01 -07:00
commit bcdaad6443

View file

@ -59,14 +59,16 @@ module Middleman::CoreExtensions
@cache[p] ||= begin @cache[p] ||= begin
file_data, content = frontmatter_and_content(p) file_data, content = frontmatter_and_content(p)
return [file_data, content] unless @app.files.exists?("#{path}.frontmatter") if @app.files.exists?("#{path}.frontmatter")
external_data, _ = frontmatter_and_content("#{p}.frontmatter")
external_data, _ = frontmatter_and_content("#{p}.frontmatter") [
external_data.deep_merge(file_data),
[ content
external_data.deep_merge(file_data), ]
content else
] [file_data, content]
end
end end
end end