sigal icon indicating copy to clipboard operation
sigal copied to clipboard

Document sort order options

Open shacker opened this issue 2 years ago • 3 comments

The documentation for Album Information says we can sort the media in albums with:

Sort: -name

in index.md, but doesn't say what the possible values for Sort can be. I want to sort by date, oldest first. I tried date and -date but those did not have any effect. I then opened one of my images in Mac Preview and looked at the EXIF data in the Info panel. It showed keys like "Date Time Digitized" and "Date Time Original". I tried both of those, with and without quotes, and it had no effect. I then installed a proper EXIF viewer and it showed different key names, like "Original Date and Time" and "Digitized Date and Time." I tried all of those, with and without quotes, and rebuilt after each change, but nothing seems to work - images appear in a random order.

So, I'm confused about what's expected here, surprised that the documentation doesn't say anything about what I'd think would be the most common way people would want to sort, and perplexed that different tools (Preview and AnyExif) show different key names in the EXIF data.

I've searched the github Issues and it seems like others are able to get date sorting working - but how?

shacker avatar Nov 16 '23 07:11 shacker

Ah! I just found that setting this:

medias_sort_attr = 'date'

in signal.conf.py does sort by date. So the documented technique of setting it in index.md has no effect, but setting it in the main project conf does. So either this is a bug or documentation update is needed. But I have a way forward. Thanks.

shacker avatar Nov 17 '23 08:11 shacker

It seems Sort: only works for sub-albums currently... and I agree the documentation can be improved.

saimn avatar Nov 22 '23 21:11 saimn

Oh - I did eventually figure this out, from a hint in another github issue:

Sort: DateTime

That does work from within index.md! Please consider documenting this.

shacker avatar Nov 23 '23 06:11 shacker