Can someone please provide an example of using the code below, either in the context of an ERB template tag or a helper?
sitemap.where(:tags.include => "homepage").order_by(:priority).limit(10)
http://middlemanapp.com/advanced/sitemap/
I would like to iterate over pages in my middleman site like this:
<% sitemap.resources.each do |page| %>
<%= page.url %>
<% end %>
But filtered only to pages containing a certain value in the metadata (type==‘presentation’) and sorted by another value in the metadata (order, which is an integer).
I really appreciate the help. I think the sitemap is part of what makes middleman extremely powerful, but it’s hard to find much documentation around it.