Sha256: ce0fd12014fc922308c31b23b48dbc37be4d7e14b256030f8d000647d5e51b2a

Contents?: true

Size: 627 Bytes

Versions: 14

Compression:

Stored size: 627 Bytes

Contents

# frozen_string_literal: true

class Roda
  module RodaPlugins
    module BridgetownSSR
      module InstanceMethods
        # Helper to get the site associated with the Roda app
        # @return [Bridgetown::Site]
        def bridgetown_site
          self.class.opts[:bridgetown_site]
        end
      end

      def self.configure(app, _opts = {}, &block)
        app.include Bridgetown::Filters::URLFilters
        app.opts[:bridgetown_site] =
          Bridgetown::Site.start_ssr!(loaders_manager: Bridgetown::Rack.loaders_manager, &block)
      end
    end

    register_plugin :bridgetown_ssr, BridgetownSSR
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.3 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.2 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.1 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.0 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.0.beta3 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.0.beta2 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.3.0.beta1 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0.beta5 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0.beta4 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0.beta3 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0.beta2 lib/roda/plugins/bridgetown_ssr.rb
bridgetown-core-1.2.0.beta1 lib/roda/plugins/bridgetown_ssr.rb