features/hooks: use hash syntax to access page

This commit is contained in:
Parker Moore 2016-01-04 12:18:02 -08:00
parent 735194ccaf
commit 2756503e7b
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ Feature: Hooks
And I have a "_plugins/ext.rb" file with content:
"""
Jekyll::Hooks.register :pages, :pre_render do |page, payload|
payload.page['myparam'] = 'special' if page.name == 'page1.html'
payload['page']['myparam'] = 'special' if page.name == 'page1.html'
end
"""
And I have a "page1.html" page that contains "{{ page.myparam }}"