Goal: excellent Mustache support in nanoc
Need alternatives for:
<%= item[:blah] %>→{{ item:blah }}<%= item.path %>→{{ item.path }}<%= layout[:blah] %>→{{ layout:blah }}<%= config[:blah] %>→{{ config:blah }}<%= some_helper(…) %>→ ???<% some_helper(…) do %>…<% end %>→ ???
Maybe these (not sure whether these are necessary in logicless templates):
<%= @items['/some/item/'][:blah] %>→ ???<%= @items['/some/item/'].path %>(andcompiled_contentetc) → ???
Conventions used here:
{{ item:blah }}: access attribute:blahin current item (totally not sure whether I like the:){{ item.path }}: call “method”pathon current item (not really a method call, because you won’t be able to just call any method)
I'm not sure if this is contrary to the design of nanoc, but what about allowing for a "global" context hash that gets mixed in to each expansion? I would like to be able to use data structures that I create in the
preprocessblock such as sorted category lists, etc.Then layouts could use