Load in config from --config switch

This commit is contained in:
Parker Moore 2013-03-16 14:44:49 +01:00
parent b49bba9351
commit 7e1100962c
1 changed files with 4 additions and 2 deletions

View File

@ -129,8 +129,10 @@ module Jekyll
# then, we need to know where to look for _config.yml
source = override['source'] || Jekyll::DEFAULTS['source']
# Get configuration from <source>/_config.yml
config_file = File.join(source, '_config.yml')
# Get configuration from <source>/_config.yml or <source>/<config_file>
config_file = override.delete('config')
config_file = File.join(source, "_config.yml") if config_file.to_s.empty?
begin
config = YAML.safe_load_file(config_file)
raise "Configuration file: (INVALID) #{config_file}" if !config.is_a?(Hash)