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