Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using default config if config passed is either empty or null

  • Loading branch information...
commit ac9a541401c74b93f6c8b62fb154d34f2f1bc0aa 1 parent d0e2a0a
@parkr parkr authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/jekyll.rb
6 lib/jekyll.rb
@@ -124,8 +124,10 @@ def self.configuration(override)
# 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 = override['config'] || File.join(source, '_config.yml')
+ # Get configuration from <source>/_config.yml or <source>/<config_file
@mattr- Owner
mattr- added a note

missing a > here at the end of the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ config_file = override.delete('config')
+ config_file = File.join(source, "_config.yml") if config_file.to_s.empty?
config = YAML.load_file(config_file)
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
Please sign in to comment.
Something went wrong with that request. Please try again.