Merge pull request #5280 from Anthony-Gaudino/documentation-hook-payload

Merge pull request 5280
This commit is contained in:
jekyllbot 2016-08-29 18:55:57 -07:00 committed by GitHub
commit 0ad9fa3ba3
1 changed files with 7 additions and 5 deletions

View File

@ -498,11 +498,13 @@ end
```
Jekyll provides hooks for <code>:site</code>, <code>:pages</code>,
<code>:posts</code>, and <code>:documents</code>. In all cases, Jekyll calls your
hooks with the container object as the first callback parameter. But in the
case of <code>:pre_render</code>, your hook will also receive a payload hash as
a second parameter which allows you full control over the variables that are
available while rendering.
<code>:posts</code>, and <code>:documents</code>. In all cases, Jekyll calls
your hooks with the container object as the first callback parameter. However,
all `:pre_render` hooks and the`:site, :post_render` hook will also provide a
payload hash as a second parameter. In the case of `:pre_render`, the payload
gives you full control over the variables that are available while rendering.
In the case of `:site, :post_render`, the payload contains final values after
rendering all the site (useful for sitemaps, feeds, etc).
The complete list of available hooks is below: