lib/cloudcannon-jekyll/generator.rb
# Override the Jekyll::Plugin spaceship to push our plugin to the very end
Override the Jekyll::Plugin spaceship to push our plugin to the very end
Override the Jekyll :: Plugin spaceship to push our plugin to the very end
def generate(site)
      @site = site
      @reader = Reader.new(@site)
      collections_config = @site.config["collections"]&.dup || {}
      collections_config.each_key do |key|
        collections_config[key] ||= { "output" => false }
      end
      payload = @site.site_payload.merge({
        "gem_version" => CloudCannonJekyll::VERSION,
      })
      drafts = add_blogging_config(collections_config)
      add_collection_paths(collections_config)
      add_data_config(collections_config)
      generate_file("config", payload.merge({
        "pwd"         => Dir.pwd,
        "config"      => @site.config,
        "collections" => collections_config,
      }))
      generate_file("details", payload.merge({
        "drafts" => drafts,
      }))
    end
def generate ( site ) @site = site @reader = Reader . new ( @site ) collections_config = @site . config [ "collections" ] &. dup || { } collections_config . each_key do | key | collections_config [ key ] ||= { "output" => false } end payload = @site . site_payload . merge ( { "gem_version" => CloudCannonJekyll :: VERSION , } ) drafts = add_blogging_config ( collections_config ) add_collection_paths ( collections_config ) add_data_config ( collections_config ) generate_file ( "config" , payload . merge ( { "pwd" => Dir . pwd , "config" => @site . config , "collections" => collections_config , } ) ) generate_file ( "details" , payload . merge ( { "drafts" => drafts , } ) ) end
Override the Jekyll::Plugin spaceship to push our plugin to the very end
Override the Jekyll :: Plugin spaceship to push our plugin to the very end
# Workaround for empty collection configurations
site
<not_specific>