Module: Jekyll
- Defined in:
- lib/tigefa.rb
Constant Summary collapse
- VERSION =
'1.1.3'
Class Method Summary collapse
-
.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.
- .logger ⇒ Object
-
.set_timezone(timezone) ⇒ Object
Static: Set the TZ environment variable to use the timezone specified.
Class Method Details
.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.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/tigefa.rb', line 73 def self.configuration(override) config = Configuration[Configuration::DEFAULTS] override = Configuration[override].stringify_keys config = config.read_config_files(config.config_files(override)) # Merge DEFAULTS < _config.yml < override config = config.deep_merge(override).stringify_keys set_timezone(config['timezone']) if config['timezone'] config end |
.logger ⇒ Object
94 95 96 |
# File 'lib/tigefa.rb', line 94 def self.logger @logger ||= Stevenson.new end |
.set_timezone(timezone) ⇒ Object
Static: Set the TZ environment variable to use the timezone specified
timezone - the IANA Time Zone
Returns nothing
90 91 92 |
# File 'lib/tigefa.rb', line 90 def self.set_timezone(timezone) ENV['TZ'] = timezone end |