(Ruby noob) I'm using nanoc to generate a site. Here is my sample page with metadata:
---
title: abc
parameters:
abc: def
ghi: ijk
---
test
I know that I can have parameters one level up but I want to access them in layout file:
<%= @item[:parameters][:abc] %>
but I got following error:
undefined method `[]' for nil:NilClass
Parameters are passed to layout because when I do:
<%= YAML::dump(@item[:parameters]) %>
I can see them. As a Ruby noob I think there's a simple solution to my problem. Also, if you could post a snippet iterating through :parameters hash I would be grateful.