Sha256: 60f6bec392c5ba9818ca179349fecf8f4c3c8760c69d324279ccb29b6a411d93

Contents?: true

Size: 801 Bytes

Versions: 10

Compression:

Stored size: 801 Bytes

Contents

# frozen_string_literal: true

require "jekyll"

require_relative "cloudcannon-jekyll/page-without-a-file"
require_relative "cloudcannon-jekyll/generator"
require_relative "cloudcannon-jekyll/configuration"
require_relative "cloudcannon-jekyll/safe-jsonify-filter"
require_relative "cloudcannon-jekyll/version"

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

10 entries across 10 versions & 1 rubygems

Version Path
cloudcannon-jekyll-1.3.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.2.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.2.3 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.2.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.1.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.1.0 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.0.8 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.0.3 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-0.0.7 lib/cloudcannon-jekyll.rb
cloudcannon-jekyll-1.0.2 lib/cloudcannon-jekyll.rb