Sha256: e163938a941b12268f351ddf64b52a9549710ea88b58124196de3322c2f4b163
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
module Jekyll module Assets module Addons module Processors class Liquid < Tilt::Template PROCESSING_FOR = %W(text/css text/sass text/less application/javascript text/scss text/coffeescript text/javascript).freeze def prepare # end # Render the file with the sites current context, anything you # can do in a normal liquid file with Jekyll, you can do here inc, # accessing the entirety of your posts and pages, though I don't # know why you would want to, and I ain't judging you. def evaluate(scope, _, jekyll = scope.environment.jekyll, &_block) jekyll.liquid_renderer.file(@file).parse(data).render!(jekyll.site_payload, :registers => { :site => jekyll }) end end end end end end # There might be a few missing, if there is please do let me know. Jekyll::Assets::Addons::Processors::Liquid::PROCESSING_FOR.each do |val| Sprockets.register_preprocessor val, Jekyll::Assets::Addons::Processors::Liquid end
Version data entries
4 entries across 4 versions & 1 rubygems