Merge configuration properly. Closes #978.

This commit is contained in:
Parker Moore 2013-04-16 00:41:10 +02:00
parent e7546a98f6
commit 82f32d5c02
1 changed files with 3 additions and 3 deletions

View File

@ -108,11 +108,10 @@ module Jekyll
#
# Returns this configuration, overridden by the values in the file
def read_config_file(file)
configuration = clone
next_config = YAML.safe_load_file(file)
raise "Configuration file: (INVALID) #{file}".yellow if !next_config.is_a?(Hash)
Jekyll::Logger.info "Configuration file:", file
configuration.deep_merge(next_config)
next_config
end
# Public: Read in a list of configuration files and merge with this hash
@ -126,7 +125,8 @@ module Jekyll
begin
files.each do |config_file|
configuration = read_config_file(config_file)
new_config = read_config_file(config_file)
configuration = configuration.deep_merge(new_config)
end
rescue SystemCallError
# Errno:ENOENT = file not found