Files

Class/Module Index [+]

Quicksearch

Jekyll

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
self.path
self.type -> :page, :post or :draft

Public: Methods that generate a URL for a resource such as a Post or a Page.

Examples

URL.new({
  :template => /:categories/:title.html",
  :placeholders => {:categories => "ruby", :title => "something"}
}).to_s

Constants

VERSION

Public Class Methods

configuration(override) click to toggle source

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.

# File lib/jekyll.rb, line 87
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 = Utils.deep_merge_hashes(config, override).stringify_keys
  set_timezone(config['timezone']) if config['timezone']

  config
end
env() click to toggle source

Public: Tells you which Jekyll environment you are building in so you can skip tasks if you need to. This is useful when doing expensive compression tasks on css and images and allows you to skip that when working in development.

# File lib/jekyll.rb, line 75
def self.env
  ENV["JEKYLL_ENV"] || "development"
end
fs_root() click to toggle source

Public: File system root

Returns the root of the filesystem as a Pathname

# File lib/jekyll.rb, line 119
def self.fs_root
  @fs_root ||= "/"
end
logger() click to toggle source
# File lib/jekyll.rb, line 108
def self.logger
  @logger ||= LogAdapter.new(Stevenson.new)
end
logger=(writer) click to toggle source
# File lib/jekyll.rb, line 112
def self.logger=(writer)
  @logger = LogAdapter.new(writer)
end
sanitized_path(base_directory, questionable_path) click to toggle source
# File lib/jekyll.rb, line 123
def self.sanitized_path(base_directory, questionable_path)
  clean_path = File.expand_path(questionable_path, fs_root)
  clean_path.gsub!(/\A\w\:\//, '/')
  unless clean_path.start_with?(base_directory)
    File.join(base_directory, clean_path)
  else
    clean_path
  end
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/jekyll.rb, line 104
def self.set_timezone(timezone)
  ENV['TZ'] = timezone
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.