Sha256: ac4204b65d34fb0b02d87ef9fbe3d93585b313f9613ff226f46701998623e156

Contents?: true

Size: 977 Bytes

Versions: 10

Compression:

Stored size: 977 Bytes

Contents

# encoding: UTF-8
require 'yaml'

module Octopress
  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',

        '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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
octopress-ink-1.0.0.rc.11 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.10 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.9 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.8 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.7 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.6 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.5 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.3 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.2 lib/octopress-ink/configuration.rb
octopress-ink-1.0.0.rc.1 lib/octopress-ink/configuration.rb