Hi! Thanks for reply, actually way more fast I expected…
So, I would like to understand better how to interact with the sitemap, at first. I’m trying to filter my content using tags, data and options, and I can’t figure how to do pretty simple things. For example, I would like to create a navigation. I have folders with pages, each for an instrument model. I created an organization using frontmatter. I would like to understand how can I filter just a specific model to appear (I would like only 3/4/ basses, in other situation I want just cellos, or basses which are suitable for solo repertoire. And so on… I cannot understand how to explicitly tell middleman to show just the pages I want.
I can create a list of a subfolder, filtered by path - very basic and inelegant - with a code like:
<% sitemap.resources.each do |page| %>
<% if page.url =~ /^(\/en\/instruments\/contrabasses\/models\/)/ %>
<li><%= link_to page.data.title, page.url %></li>
<% end %>
<% end %>
However, if I do:
<% sitemap.resources.each do |page| %>
<% if page.data.sizes == ‘small’ %>
<%= link_to page.data.title, page.url %>
<% end %>
<% end %>
nothing appear.
If I choose to use the layout of a page as filter, I think I can do something like this:
<% sitemap.resources.each do |page| %>
<% if page.options.layout == ‘basses’ %>
<%= link_to page.data.title, page.url %>
<% end %>
<% end %>
but, again, nothing appear.
I think that middleman documentation could have some more examples, with more cases, to help a newcomer to understand better how a case differ to others and to better figure out how we can manipulate the content.
Thanks!