Sha256: 8cb5b1294abb376a73d4f66ada73645630e4ada8a37da3920c4e270a3497e6c4

Contents?: true

Size: 900 Bytes

Versions: 5

Compression:

Stored size: 900 Bytes

Contents

# frozen_string_literal: true

require "jekyll"

module CloudCannonJekyll
  autoload :PageWithoutAFile,  "cloudcannon-jekyll/page-without-a-file"
  autoload :Generator,         "cloudcannon-jekyll/generator"
  autoload :Configuration,     "cloudcannon-jekyll/configuration"
  autoload :SafeJsonifyFilter, "cloudcannon-jekyll/safe-jsonify-filter"
  autoload :VERSION,           "cloudcannon-jekyll/version"
end

Liquid::Template.register_filter(CloudCannonJekyll::SafeJsonifyFilter)

# Hooks didn't exist in Jekyll 2 so we monkey patch to get an :after_reset hook
if Jekyll::VERSION.start_with? "2"
  module Jekyll
    class Site
      alias_method :jekyll_reset, :reset

      def reset
        jekyll_reset
        CloudCannonJekyll::Configuration.set(self)
      end
    end
  end
else
  Jekyll::Hooks.register :site, :after_reset do |site|
    CloudCannonJekyll::Configuration.set(site)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cloudcannon-jekyll-0.0.6 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.0.1 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.0.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.0.5 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.0.4 lib/cloudcannon-jekyll.rb