class Middleman::Renderers::KramdownTemplate

Our own Kramdown Tilt template that simply uses our custom renderer.

Public Class Methods

new(*args, &block) click to toggle source
Calls superclass method
# File lib/middleman-core/renderers/kramdown.rb, line 7
def initialize(*args, &block)
  super

  @context = @options[:context] if @options.key?(:context)
end

Public Instance Methods

evaluate(context, *) click to toggle source
# File lib/middleman-core/renderers/kramdown.rb, line 13
def evaluate(context, *)
  MiddlemanKramdownHTML.scope = @context || context

  @output ||= begin
    output, warnings = MiddlemanKramdownHTML.convert(@engine.root, @engine.options)
    @engine.warnings.concat(warnings)
    output
  end
end