lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.rc.11 vs lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.rc.13

- old
+ new

@@ -1,9 +1,19 @@ # encoding: UTF-8 require 'yaml' module Octopress + # Override Octopress configuration to Merge with Ink's defaults + # + class << self + alias_method :orig_config, :config + + def config(options={}) + Jekyll::Utils.deep_merge_hashes(Ink::Configuration::DEFAULTS, orig_config(options)) + end + end + module Ink module Configuration DEFAULTS = { 'docs_mode' => false, 'combine_css' => true, @@ -11,37 +21,10 @@ 'combine_js' => true, 'compress_js' => true, 'uglifier' => {}, 'disable' => [], 'date_format' => 'ordinal', - - 'linkpost' => { - 'marker' => "→", - 'marker_position' => 'after' - }, - - 'post' => { - 'marker' => false, - 'marker_position' => 'before' - } } - - def self.config - @config ||= Jekyll::Utils.deep_merge_hashes(DEFAULTS, octopress_config) - end - - def self.octopress_config - if defined? Octopress.config - Octopress.config - else - file = '_octopress.yml' - if File.exist?(file) - SafeYAML.load_file(file) || {} - else - {} - end - end - end end end end