Proposed Middleman 4 changes (Queryable Sitemap API)

As shown in https://middlemanapp.com/basics/upgrade-v4/ the queryable sitemap API will be removed in version 4. What will be the alternative approach to say building a navigation page?

I am proposing to use Middleman for a new project but the queryable sitemap might play a prominent role in producing this content and tag driven website, so I am concerned that if this is removed then I may have already limited my choices.

For example the homepage (at the moment) shows all content for the “education” category:

<% sitemap.where({:categories.include => "education"}).order_by(published_date: :desc).all do |resource| %>
  <a href="<%= resource.path %>">
    <h1><%= resource.data.title %></h1>
    <img src="<%= resource.data.image %>" alt="">
  </a>
<% end %>

What would be an alternative approach (forgive me if this is an obvious answer)

2 Likes