Load in config from --config switch
This commit is contained in:
parent
b49bba9351
commit
7e1100962c
|
@ -129,8 +129,10 @@ module Jekyll
|
||||||
# then, we need to know where to look for _config.yml
|
# then, we need to know where to look for _config.yml
|
||||||
source = override['source'] || Jekyll::DEFAULTS['source']
|
source = override['source'] || Jekyll::DEFAULTS['source']
|
||||||
|
|
||||||
# Get configuration from <source>/_config.yml
|
# Get configuration from <source>/_config.yml or <source>/<config_file>
|
||||||
config_file = File.join(source, '_config.yml')
|
config_file = override.delete('config')
|
||||||
|
config_file = File.join(source, "_config.yml") if config_file.to_s.empty?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
config = YAML.safe_load_file(config_file)
|
config = YAML.safe_load_file(config_file)
|
||||||
raise "Configuration file: (INVALID) #{config_file}" if !config.is_a?(Hash)
|
raise "Configuration file: (INVALID) #{config_file}" if !config.is_a?(Hash)
|
||||||
|
|
Loading…
Reference in New Issue