features/hooks: use hash syntax to access page
This commit is contained in:
parent
735194ccaf
commit
2756503e7b
|
@ -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 }}"
|
||||
|
|
Loading…
Reference in New Issue