Method: Jekyll.configuration
- Defined in:
- lib/jekyll.rb
.configuration(override = {}) ⇒ Object
Public: Generate a Jekyll configuration Hash by merging the default options with anything in _config.yml, and adding the given options on top.
override - A Hash of config directives that override any options in both
the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
list of option names and their defaults.
Returns the final configuration Hash.
98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/jekyll.rb', line 98 def configuration(override = {}) config = Configuration[Configuration::DEFAULTS] override = Configuration[override].stringify_keys unless override.delete('skip_config_files') config = config.read_config_files(config.config_files(override)) end # Merge DEFAULTS < _config.yml < override config = Utils.deep_merge_hashes(config, override).stringify_keys set_timezone(config['timezone']) if config['timezone'] config end |