Module: Jekyll
- Defined in:
- lib/jekyll/convertible.rb,
lib/jekyll.rb,
lib/jekyll/page.rb,
lib/jekyll/post.rb,
lib/jekyll/site.rb,
lib/jekyll/errors.rb,
lib/jekyll/layout.rb,
lib/jekyll/plugin.rb,
lib/jekyll/filters.rb,
lib/jekyll/converter.rb,
lib/jekyll/generator.rb,
lib/jekyll/static_file.rb,
lib/jekyll/migrators/mt.rb,
lib/jekyll/tags/include.rb,
lib/jekyll/migrators/csv.rb,
lib/jekyll/migrators/typo.rb,
lib/jekyll/tags/highlight.rb,
lib/jekyll/migrators/drupal.rb,
lib/jekyll/migrators/marley.rb,
lib/jekyll/converters/textile.rb,
lib/jekyll/migrators/mephisto.rb,
lib/jekyll/converters/identity.rb,
lib/jekyll/converters/markdown.rb,
lib/jekyll/migrators/wordpress.rb,
lib/jekyll/generators/pagination.rb,
lib/jekyll/migrators/textpattern.rb,
lib/jekyll/migrators/wordpress.com.rb
Overview
This importer takes a wordpress.xml file, which can be exported from your wordpress.com blog (/wp-admin/export.php)
Defined Under Namespace
Modules: CSV, Convertible, Drupal, Filters, MT, Marley, Mephisto, TextPattern, Typo, WordPress, WordpressDotCom Classes: Converter, FatalException, Generator, HighlightBlock, IdentityConverter, IncludeTag, Layout, MarkdownConverter, Page, Pager, Pagination, Plugin, Post, Site, StaticFile, TextileConverter
Constant Summary collapse
- VERSION =
'0.10.0'
- DEFAULTS =
Default options. Overriden by values in _config.yml or command-line opts. (Strings rather symbols used for compatability with YAML).
{ 'safe' => false, 'auto' => false, 'server' => false, 'server_port' => 4000, 'source' => Dir.pwd, 'destination' => File.join(Dir.pwd, '_site'), 'plugins' => File.join(Dir.pwd, '_plugins'), 'future' => true, 'lsi' => false, 'pygments' => false, 'markdown' => 'maruku', 'permalink' => 'date', 'maruku' => { 'use_tex' => false, 'use_divs' => false, 'png_engine' => 'blahtex', 'png_dir' => 'images/latex', 'png_url' => '/images/latex' }, 'rdiscount' => { 'extensions' => [] }, 'kramdown' => { 'auto_ids' => true, 'footnote_nr' => 1, 'entity_output' => 'as_char', 'toc_levels' => '1..6', 'use_coderay' => false, 'coderay' => { 'coderay_wrap' => 'div', 'coderay_line_numbers' => 'inline', 'coderay_line_number_start' => 1, 'coderay_tab_width' => 4, 'coderay_bold_every' => 10, 'coderay_css' => 'style' } } }
Class Method Summary collapse
-
.configuration(override) ⇒ Object
Generate a Jekyll configuration Hash by merging the default options with anything in _config.yml, and adding the given options on top.
Class Method Details
.configuration(override) ⇒ Object
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::DEFAULTS for a
list of option names and their defaults.
Returns the final configuration Hash.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/jekyll.rb', line 104 def self.configuration(override) # _config.yml may override default source location, but until # then, we need to know where to look for _config.yml source = override['source'] || Jekyll::DEFAULTS['source'] # Get configuration from <source>/_config.yml config_file = File.join(source, '_config.yml') begin config = YAML.load_file(config_file) raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash) $stdout.puts "Configuration from #{config_file}" rescue => err $stderr.puts "WARNING: Could not read configuration. " + "Using defaults (and options)." $stderr.puts "\t" + err.to_s config = {} end # Merge DEFAULTS < _config.yml < override Jekyll::DEFAULTS.deep_merge(config).deep_merge(override) end |