Clarify how to access `site`

I was unable to access the config at `context.registers.config`. Everything seems to point towards the `site` variable being accessed via `context.registers[:site]`.
This commit is contained in:
Philip Poots 2013-12-22 23:01:13 +00:00
parent 354b4b9c54
commit e17f997e75
1 changed files with 2 additions and 2 deletions

View File

@ -339,9 +339,9 @@ Liquid::Template.register_filter(Jekyll::AssetFilter)
<h5>ProTip™: Access the site object using Liquid</h5> <h5>ProTip™: Access the site object using Liquid</h5>
<p> <p>
Jekyll lets you access the <code>site</code> object through the Jekyll lets you access the <code>site</code> object through the
<code>context.registers</code> feature of Liquid. For example, you can <code>context.registers</code> feature of Liquid at <code>context.registers[:site]. For example, you can
access the global configuration file <code>_config.yml</code> using access the global configuration file <code>_config.yml</code> using
<code>context.registers.config</code>. <code>context.registers[:site].config</code>.
</p> </p>
</div> </div>