lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.alpha.44 vs lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.alpha.45

- old
+ new

@@ -1,31 +1,39 @@ +# encoding: UTF-8 require 'yaml' module Octopress module Ink module Configuration DEFAULTS = { 'docs_mode' => false, - 'concat_css' => true, - 'concat_js' => true, - 'stylesheets_dir' => '_stylesheets', - 'javascripts_dir' => '_javascripts', - 'stylesheets' => [], - 'javascripts' => [], - 'disable' => [] + 'combine_css' => true, + 'compress_css' => true, + 'combine_js' => true, + 'compress_js' => true, + 'disable' => [], + 'date_format' => 'ordinal', + 'linkpost' => { + 'marker' => "→", + 'marker_position' => 'after' + }, + 'post' => { + 'marker' => false, + 'marker_position' => 'before' + } } def self.config - @config ||= DEFAULTS.deep_merge(octopress_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 - YAML.safe_load(File.open(file).read || {}) + if File.exist?(file) + SafeYAML.load_file(file) || {} else {} end end end