mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Given file-based metadata precedence over config/path metadata. Fixes #552
This commit is contained in:
parent
0625d96e43
commit
80e36b7c53
3 changed files with 9 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
Master
|
||||
===
|
||||
|
||||
* Give file metadata (such as frontmatter) precedence over path meta. #552
|
||||
* Add `sass_assets_paths` option for arbitrary sass partial locations.
|
||||
* Don't catch CoffeeScript errors when in build mode.
|
||||
* Extract load_paths so they aren't locked into the binary
|
||||
|
|
|
@ -54,13 +54,13 @@ module Middleman
|
|||
# Get the metadata for both the current source_file and the current path
|
||||
# @return [Hash]
|
||||
def metadata
|
||||
result = store.metadata_for_file(source_file).dup
|
||||
result = store.metadata_for_path(path).dup
|
||||
|
||||
path_meta = store.metadata_for_path(path).dup
|
||||
if path_meta.has_key?(:blocks)
|
||||
result[:blocks] << path_meta.delete(:blocks)
|
||||
file_meta = store.metadata_for_file(source_file).dup
|
||||
if file_meta.has_key?(:blocks)
|
||||
result[:blocks] << file_meta.delete(:blocks)
|
||||
end
|
||||
result.deep_merge!(path_meta)
|
||||
result.deep_merge!(file_meta)
|
||||
|
||||
local_meta = @local_metadata.dup
|
||||
if local_meta.has_key?(:blocks)
|
||||
|
|
Loading…
Reference in a new issue