Accessing Sitemap resources with "where" returns an error

In my layout.erb file I have:

          <% sitemap.where(:category => 'reviews').all.each do |resource| %>
            <%= link_to resource.metadata[:page]["title"], resource.url %>
          <% end %>

I keep getting the following error:

NoMethodError at /
undefined method `where’ for #< Middleman::Sitemap::Store:0x81405340>

Any ideas?

I’m using Ruby 2.3.0 if that matters.