Blog posts collection not ordered correctly by date

I have a blog using the antimatter theme, every post has a date in the header in the format dd-mm-yyyy, all posts are ordered by date in descending order as I expect. All posts have a category blog and tag for country e.g. it. I have a menu option with a page collection of the posts selected by country tag however those display in a random order or at least not in an order I can recognise despite using the same syntax for my 01.blog/blog.md file as for my 03.country/01.it/blog.md` file.

title: Italy
content:
  items:
    '@taxonomy.tag': it
    order:
        by: date
        dir: desc
    limit: 12
    pagination: true
    url_taxonomy_filters: true
show_sidebar: false
access:
    site.login: true
---

Any suggestions for where to look for a solution, page collections in a menu perhaps? I haven’t found anything in the forum that matches my case and anyway the posts at the top level are perfectly ordered.

@lordkelvin88, order, limit, pagination and url_taxonomy_filters should be at same indentation level as items as they belong to property content not items. In your version, these properties are being ignored.

---
title: Italy
content:
  items:
    '@taxonomy.tag': it
  order:
    by: date
    dir: desc
  limit: 12
  pagination: true
  url_taxonomy_filters: true
show_sidebar: false
access:
  site.login: true
---

Thanks, that was absolutely the problem, I’ve been careless in my indenting.

@lordkelvin88, On Discourse, you mark a topic as solved by ticking the ‘solution’ icon in the lower right corner of the reply that provided the solution. The topic will then be shown as ‘solved’ in the list. No need to update the title.

1 Like