Module: Roda::RodaPlugins::BridgetownSSR
- Defined in:
- bridgetown-core/lib/roda/plugins/bridgetown_ssr.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.configure(app, _opts = {}) ⇒ Object
25 26 27 28 29 |
# File 'bridgetown-core/lib/roda/plugins/bridgetown_ssr.rb', line 25 def self.configure(app, _opts = {}, &) app.include Bridgetown::Filters::URLFilters app.opts[:bridgetown_site] = Bridgetown::Site.start_ssr!(loaders_manager: Bridgetown::Rack.loaders_manager, &) end |
.load_dependencies(app) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'bridgetown-core/lib/roda/plugins/bridgetown_ssr.rb', line 16 def self.load_dependencies(app) app.plugin :custom_block_results # This lets us return callable objects directly in Roda response blocks app.handle_block_result(Bridgetown::RodaCallable) do |callable| callable.(self) end end |