lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.rc.18 vs lib/octopress-ink/configuration.rb in octopress-ink-1.0.0.rc.19
- old
+ new
@@ -1,30 +1,22 @@
# encoding: UTF-8
require 'yaml'
module Octopress
- # Override Octopress configuration to Merge with Ink's defaults
- #
- class << self
- alias_method :orig_config, :config
+ module Ink
+ DEFAULT_OPTIONS = {
+ 'combine_css' => true,
+ 'compress_css' => true,
+ 'combine_js' => true,
+ 'compress_js' => true,
+ 'uglifier' => {},
+ 'disable' => [],
+ 'date_format' => 'ordinal',
+ }
- def config(options={})
- Jekyll::Utils.deep_merge_hashes(Ink::Configuration::DEFAULTS, orig_config(options))
+ def self.configuration(options={})
+ @config ||= DEFAULT_OPTIONS.merge(Octopress.configuration(options))
end
- end
- module Ink
- module Configuration
- DEFAULTS = {
- 'docs_mode' => false,
- 'combine_css' => true,
- 'compress_css' => true,
- 'combine_js' => true,
- 'compress_js' => true,
- 'uglifier' => {},
- 'disable' => [],
- 'date_format' => 'ordinal',
- }
- end
end
end