move document.post_render hook to after render call
This commit is contained in:
parent
736e6a78f1
commit
79a178f7f1
|
@ -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|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue