Sha256: abe7136ce055d96d9ff9a8e6b1f64f40eb5460e69065de1ddca51a993f9e7e9a
Contents?: true
Size: 512 Bytes
Versions: 8
Compression:
Stored size: 512 Bytes
Contents
# encoding: utf-8 require 'slim' module Nanoc3::Filters # @since 3.2.0 class Slim < Nanoc3::Filter # Runs the content through [Slim](http://slim-lang.com/) # This method takes no options. # # @param [String] content The content to filter # # @return [String] The filtered content def run(content, params={}) # Create context context = ::Nanoc3::Context.new(assigns) ::Slim::Template.new { content }.render(context) { assigns[:content] } end end end
Version data entries
8 entries across 8 versions & 1 rubygems