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_content
etc) → ???
Conventions used here:
{{ item:blah }}
: access attribute:blah
in current item (totally not sure whether I like the:
){{ item.path }}
: call “method”path
on current item (not really a method call, because you won’t be able to just call any method)
I'm kind of new to Mustache, so I'm still not sure if it allows for nested attributes. Would we be able to access nested item metadata? i.e. given an item like
--- location: venue_name: Agganis Arena venue_city: Boston, MA
...would we be able to write
{{ item.location.venue_city }}
?