class Octopress::Hooks::Page
Public Instance Methods
Merges payload with original page payload Allowing merged_payload to return hash fragments, for example: merge_payload
can return { awesome => true } and it will be merged into the full payload.
Retuns: a payload that has been deep merged with the original page's payload
# File lib/octopress-hooks.rb, line 80 def deep_merge_payload(page_payload, hook_payload) Jekyll::Utils.deep_merge_hashes(page_payload, hook_payload) end
Called right after pre_render
hook. Allows you to act on the page's payload data.
Return: hash to be deep_merged into payload
# File lib/octopress-hooks.rb, line 69 def merge_payload(payload, page) payload end
Called after the post is rendered with the converter. Use the post object to modify it's contents before the post is inserted into the template.
# File lib/octopress-hooks.rb, line 88 def post_render(page) end
Called after the post is written to the disk. Use the post object to read it's contents to do something after the post is safely written.
# File lib/octopress-hooks.rb, line 95 def post_write(page) end
Called before post is sent to the converter. Allows you to modify the post object before the converter does it's thing
# File lib/octopress-hooks.rb, line 61 def pre_render(page) end