module Moft
Convertible
provides methods for converting a pagelike item from a certain type of markup into actual content
Requires
self.site -> Moft::Site self.content self.content= self.data= self.ext= self.output= self.name
Gist Liquid Tag
Example:
{% gist 1234567 %} {% gist 1234567 file.rb %}
Constants
- VERSION
Public Class Methods
configuration(override)
click to toggle source
Public: Generate a Moft
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 Moft::Configuration::DEFAULTS for a list of option names and their defaults.
Returns the final configuration Hash
.
# File lib/moft.rb, line 69 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
set_timezone(timezone)
click to toggle source
Static: Set the TZ environment variable to use the timezone specified
timezone - the IANA Time Zone
Returns nothing
# File lib/moft.rb, line 86 def self.set_timezone(timezone) ENV['TZ'] = timezone end