module Roda::RodaPlugins::RenderLocals::InstanceMethods

def render_template_opts(template, opts)

If this isn't the layout template, then use the plugin's render locals as the default locals.
def render_template_opts(template, opts)
  opts = super
  return opts if opts[:_is_layout]
  plugin_locals = render_locals
  if locals = opts[:locals]
    plugin_locals = Hash[plugin_locals].merge!(locals)
  end
  opts[:locals] = plugin_locals
  opts
end