move document.post_render hook to after render call

This commit is contained in:
Stephen Crosby 2015-05-03 13:53:28 -07:00
parent 736e6a78f1
commit 79a178f7f1
2 changed files with 1 additions and 2 deletions

View File

@ -175,8 +175,6 @@ module Jekyll
# #
# Returns nothing. # Returns nothing.
def write(dest) def write(dest)
Jekyll::Hooks.trigger self, :post_render
path = destination(dest) path = destination(dest)
FileUtils.mkdir_p(File.dirname(path)) FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'wb') do |f| File.open(path, 'wb') do |f|

View File

@ -160,6 +160,7 @@ module Jekyll
collection.docs.each do |document| collection.docs.each do |document|
if regenerator.regenerate?(document) if regenerator.regenerate?(document)
document.output = Jekyll::Renderer.new(self, document, payload).run document.output = Jekyll::Renderer.new(self, document, payload).run
Jekyll::Hooks.trigger document, :post_render
end end
end end
end end