lib/octopress-ink/plugin.rb in octopress-ink-1.0.0.rc.42 vs lib/octopress-ink/plugin.rb in octopress-ink-1.0.0.rc.43

- old
+ new

@@ -137,11 +137,16 @@ # # returns: Hash of merged user and default config.yml files # def config(lang=nil) @config ||= configs.first.read - lang_config_hash[lang] || @config + + if lang + lang_config_hash[lang] || @config + else + @config + end end # Language configurations # # returns: Hash of configs for files matching: conifg_[lang].yml @@ -155,16 +160,16 @@ def lang_config_hash @lang_config_hash ||= begin configs = {} user_lang_configs.each do |lang, file| - configs[lang] = SafeYAML.load_file(file) + configs[lang] = Jekyll::Utils.deep_merge_hashes(config, SafeYAML.load_file(file)) end plugin_lang_configs.each do |lang, file| # Add to lang @lang_configs << Assets::LangConfig.new(self, File.basename(file), lang) - configs[lang] = @lang_configs.last.read + configs[lang] = Jekyll::Utils.deep_merge_hashes(config, @lang_configs.last.read) end configs end end