Module: Middleman::Renderers::Slim
- Defined in:
- lib/middleman-core/renderers/slim.rb
Overview
Slim renderer
Class Method Summary collapse
-
.registered(app) ⇒ Object
(also: included)
Once registered.
Class Method Details
.registered(app) ⇒ Object Also known as: included
Once registered
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/middleman-core/renderers/slim.rb', line 14 def registered(app) app.before_configuration do template_extensions :slim => :html end # Setup Slim options to work with partials ::Slim::Engine.( :buffer => '@_out_buf', :generator => ::Temple::Generators::StringBuffer ) app.after_configuration do context_hack = { :context => self } %w(sass scss markdown).each do |engine| ::Slim::EmbeddedEngine.[engine.to_sym] = context_hack end end end |