diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 3544b98b..c166e42e 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -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