Module: Jekyll

Defined in:
lib/jekyll/url.rb,
lib/jekyll.rb,
lib/jekyll/page.rb,
lib/jekyll/post.rb,
lib/jekyll/site.rb,
lib/jekyll/draft.rb,
lib/jekyll/errors.rb,
lib/jekyll/layout.rb,
lib/jekyll/plugin.rb,
lib/jekyll/cleaner.rb,
lib/jekyll/command.rb,
lib/jekyll/excerpt.rb,
lib/jekyll/filters.rb,
lib/jekyll/converter.rb,
lib/jekyll/generator.rb,
lib/jekyll/stevenson.rb,
lib/jekyll/tags/gist.rb,
lib/jekyll/deprecator.rb,
lib/jekyll/convertible.rb,
lib/jekyll/static_file.rb,
lib/jekyll/commands/new.rb,
lib/jekyll/tags/include.rb,
lib/jekyll/configuration.rb,
lib/jekyll/related_posts.rb,
lib/jekyll/tags/post_url.rb,
lib/jekyll/commands/build.rb,
lib/jekyll/commands/serve.rb,
lib/jekyll/tags/highlight.rb,
lib/jekyll/commands/doctor.rb,
lib/jekyll/converters/textile.rb,
lib/jekyll/converters/identity.rb,
lib/jekyll/converters/markdown.rb,
lib/jekyll/generators/pagination.rb,
lib/jekyll/converters/markdown/maruku_parser.rb,
lib/jekyll/converters/markdown/kramdown_parser.rb,
lib/jekyll/converters/markdown/rdiscount_parser.rb,
lib/jekyll/converters/markdown/redcarpet_parser.rb

Overview

Convertible provides methods for converting a pagelike item from a certain type of markup into actual content

Requires

self.site -> Jekyll::Site
self.content
self.content=
self.data=
self.ext=
self.output=
self.name

Defined Under Namespace

Modules: Commands, Converters, Convertible, Filters, Generators, Tags Classes: Command, Configuration, Converter, Deprecator, Draft, Excerpt, FatalException, Generator, GistTag, Layout, Page, Pager, Plugin, Post, RelatedPosts, Site, StaticFile, Stevenson, URL

Constant Summary collapse

VERSION =
'1.2.0'

Class Method Summary collapse

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/jekyll.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

.loggerObject



94
95
96
# File 'lib/jekyll.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/jekyll.rb', line 90

def self.set_timezone(timezone)
  ENV['TZ'] = timezone
end