class Octopress::Hooks::Page

Public Instance Methods

deep_merge_payload(page_payload, hook_payload) click to toggle source

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
merge_payload(payload, page) click to toggle source

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
post_init(page) click to toggle source

Called after Page is initialized allows you to modify a # page object before it is added to the Jekyll pages array

# File lib/octopress-hooks.rb, line 54
def post_init(page)
end
post_render(page) click to toggle source

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
post_write(page) click to toggle source

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
pre_render(page) click to toggle source

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