Renderer: set paginator
This commit is contained in:
parent
0a6f289ba5
commit
66dc083ad0
|
@ -48,10 +48,18 @@ module Jekyll
|
||||||
|
|
||||||
payload["page"] = document.to_liquid
|
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'
|
if document.is_a?(Document) && document.collection.label == 'posts'
|
||||||
payload['site']['related_posts'] = document.related_posts
|
payload['site']['related_posts'] = document.related_posts
|
||||||
end
|
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
|
Jekyll.logger.debug "Pre-Render Hooks:", document.relative_path
|
||||||
document.trigger_hooks(:pre_render, payload)
|
document.trigger_hooks(:pre_render, payload)
|
||||||
|
|
||||||
|
@ -60,10 +68,6 @@ module Jekyll
|
||||||
:registers => { :site => site, :page => payload['page'] }
|
: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
|
output = document.content
|
||||||
|
|
||||||
if document.render_with_liquid?
|
if document.render_with_liquid?
|
||||||
|
|
Loading…
Reference in New Issue