lib/troy/helpers.rb in troy-0.0.31 vs lib/troy/helpers.rb in troy-0.0.32

- old
+ new

@@ -8,10 +8,11 @@ I18n.t(*args) end def partial(name, locals = {}) path = site.root.join("partials/_#{name}.erb") - EmbeddedRuby.new(path.read, locals.merge(site: site)).render + locals = locals.merge(site: site, page: page) + EmbeddedRuby.new(path.read, locals).render rescue Exception, StandardError => error raise "Unable to render #{path}; #{error.message}" end def inline_file(path)