Merge pull request #906 from adamesque/master
Make sure Frontmatter data is actually cached
This commit is contained in:
commit
bcdaad6443
1 changed files with 9 additions and 7 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue