Sha256: d29838ef9fa9e07bda1dc0fb9e200055fa706cef9dd178632589248b6cf37346
Contents?: true
Size: 879 Bytes
Versions: 14
Compression:
Stored size: 879 Bytes
Contents
require "tilt" require "tilt/erubi" require "serbea/helpers" require "serbea/pipeline" require "serbea/template_engine" module Tilt class SerbeaTemplate < ErubiTemplate def prepare @options.merge!( outvar: "@_erbout", bufval: "Serbea::OutputBuffer.new", literal_prefix: "{%", literal_postfix: "%}", engine_class: Serbea::TemplateEngine ) super end def encoding @src.encoding end end end Tilt.register Tilt::SerbeaTemplate, "serb" if defined?(Rails::Railtie) class Railtie < ::Rails::Railtie initializer :serbea do |app| ActiveSupport.on_load(:action_view) do require "serbea/rails_support" ActionController::Base.include Serbea::Rails::FrontmatterControllerActions end end end end if defined?(Bridgetown) require "serbea/bridgetown_support" end
Version data entries
14 entries across 14 versions & 1 rubygems