Multi level sort

I wanted to propose a way to sort by several variables, where further variables are used to tie-break. The use case for this is simple: I have three tiers of projects – stellar, cool, and meh – each of which corresponding to a weight value, and in each category, I’d like the projects to sort themselves by date. Doing this manually is tedious – if I’m using different weights for each post, then every time I add a new ‘cool’ project I have to change the weight values of all the ‘cool’ and ‘meh’ projects.

API-wise, I envision this as the sort_by variable taking in either a single string value as usual, or optionally an array like [“weight”, “date”] where each variable corresponds to one level of the nested sort.

Implementation-wise, I’m new to the Zola codebase but upon a quick look it seems like here would be a reasonable place to start?

When you say sort, it’s only the filter or the pages sort as well?

Pages sort too! I feel like multi level sort is a reasonable sorting method to provide in any case.