welpo / tabi

A modern Zola theme with search, multilingual support, optional JavaScript, a perfect Lighthouse score, and a focus on accessibility.
https://welpo.github.io/tabi/
MIT License
97 stars 32 forks source link

Archives template: years ordered descending but posts not ordered at all #339

Closed metaleap closed 6 days ago

metaleap commented 6 days ago

Thanks for a fine theme! But, any ideas on this? Unexpectedly, my listing based on archive.html template has its year-sections ordered fine but posts in every year-section unordered, such as here:

image

But the .md files in question do have proper dates:

image

And content/blog/_index.md is just simply:

+++
title = "Posts"
template = "archive.html"
+++

This is with v2.11.0 (just git cloned yesterday).

welpo commented 6 days ago

Hey Phil!

What's the value of sort_by on the _index.md of the section(s) you are archiving? It should work if it's sort_by = "date". tabi demo example.

metaleap commented 6 days ago

Thaaat's it, thanks for that! Wasn't on my radar — it's the blog section itself that is directly using the archives.html template, no separate archives section here. But this solves the issue here, merci!

welpo commented 6 days ago

Great! I'll add a mention of this to the docs.