nicokaiser / hugo-theme-gallery

Gallery Theme for Hugo
https://nicokaiser.github.io/hugo-theme-gallery/
MIT License
344 stars 99 forks source link

Make sort order customizable #1

Open nicokaiser opened 1 year ago

nicokaiser commented 1 year ago

Sort order of albums (list) and photos (page) should be customizable in the frontmatter (sort_by, sort_order).

LNA-DEV commented 11 months ago

First of all thank you for this awesome theme.

What is the status of this issue?

I noticed there's some activity in layouts/partials/page_gallery.html regarding this issue, but it doesn't appear to be functioning yet. Can you confirm if this is correct?

Would be cool to have this feature :smile:

If it is not already working can I somehow assist?

nicokaiser commented 11 months ago

You can set the order of photos in an album using the sort_by and sort_order frontmatter variables: https://raw.githubusercontent.com/nicokaiser/hugo-theme-gallery/52573f5990d69a1adec845488fa836499e3061db/exampleSite/content/nature/index.md

Sorting albums is currently not supported, albums are always sorted by date descending (because sorting of albums = pages requires a different approach than sorting photos).

LNA-DEV commented 11 months ago

Great. Thanks for the clarification :+1: