From 82f32d5c02d2f94c6b30d32c9157e6f792527a29 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 16 Apr 2013 00:41:10 +0200 Subject: [PATCH] Merge configuration properly. Closes #978. --- lib/jekyll/configuration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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