Renderer: set paginator

This commit is contained in:
Parker Moore 2016-01-18 12:47:36 -08:00
parent 0a6f289ba5
commit 66dc083ad0
1 changed files with 8 additions and 4 deletions

View File

@ -48,10 +48,18 @@ module Jekyll
payload["page"] = document.to_liquid
if document.respond_to? :pager
payload["paginator"] = document.pager.to_liquid
end
if document.is_a?(Document) && document.collection.label == 'posts'
payload['site']['related_posts'] = document.related_posts
end
# render and transform content (this becomes the final content of the object)
payload['highlighter_prefix'] = converters.first.highlighter_prefix
payload['highlighter_suffix'] = converters.first.highlighter_suffix
Jekyll.logger.debug "Pre-Render Hooks:", document.relative_path
document.trigger_hooks(:pre_render, payload)
@ -60,10 +68,6 @@ module Jekyll
:registers => { :site => site, :page => payload['page'] }
}
# render and transform content (this becomes the final content of the object)
payload['highlighter_prefix'] = converters.first.highlighter_prefix
payload['highlighter_suffix'] = converters.first.highlighter_suffix
output = document.content
if document.render_with_liquid?