Sha256: 95c1dcb856b54b7fcc47a1c35ad2e90359343f82002cbd5a4032ef04b85c6f61
Contents?: true
Size: 486 Bytes
Versions: 15
Compression:
Stored size: 486 Bytes
Contents
# Render text via the Haml library if try_require('haml', 'haml') Webby::Filters.register :haml do |input, cursor| opts = ::Webby.site.haml_options.merge(cursor.page.haml_options || {}) b = cursor.renderer.get_binding Haml::Engine.new(input, opts).to_html(b) end # Otherwise raise an error if the user tries to use haml else Webby::Filters.register :haml do |input, cursor| raise Webby::Error, "'haml' must be installed to use the haml filter" end end # EOF
Version data entries
15 entries across 15 versions & 7 rubygems