mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Load in config from --config switch
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user