Allow frontmatter renderer_options key to overwrite renderer options on a per-file basis. closes #859

This commit is contained in:
Thomas Reynolds 2013-04-11 10:13:36 -07:00
parent 9fc06035b1
commit a0445e405a
11 changed files with 82 additions and 0 deletions

View file

@ -250,6 +250,9 @@ module Middleman
options = opts.merge(options_for_ext(extension))
options[:outvar] ||= '@_out_buf'
# Overwrite with frontmatter options
options = options.deep_merge(options[:renderer_options]) if options[:renderer_options]
template_class = Tilt[path]
# Allow hooks to manipulate the template before render
self.class.callbacks_for_hook(:before_render).each do |callback|