Sha256: 4ad1c028573fcf226261696876eee533f0f503b2888bc5e41c53be63fb0d6927
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
module Plate # Extended from the base Tilt::Template class at: # https://github.com/rtomayko/tilt/blob/master/lib/tilt/css.rb # # Modifications have been made to use the site caching folder. class SassTemplate < Tilt::Template self.default_mime_type = 'text/css' def self.engine_initialized? defined? ::Sass::Engine end def initialize_engine require_template_library 'sass' end def prepare end def syntax :sass end def evaluate(scope, locals, &block) paths = [ scope.pathname, File.join(scope.site.source, 'content') ] style = scope.site.options[:sass_style] || 'expanded' options = { :filename => eval_file, :line => line, :syntax => syntax, :style => style.to_sym, :load_paths => paths } if scope.site.cache_location options[:cache_location] = File.join(scope.site.cache_location, 'sass-cache') end ::Sass::Engine.new(data, options).render end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
plate-0.6.0 | lib/plate/sass_template.rb |