Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sort order customizable #1

Open
nicokaiser opened this issue Jul 13, 2023 · 3 comments
Open

Make sort order customizable #1

nicokaiser opened this issue Jul 13, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@nicokaiser
Copy link
Owner

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

@nicokaiser nicokaiser added the enhancement New feature or request label Jul 13, 2023
@LNA-DEV
Copy link
Contributor

LNA-DEV commented Nov 26, 2023

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 😄

If it is not already working can I somehow assist?

@nicokaiser
Copy link
Owner Author

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
Copy link
Contributor

LNA-DEV commented Nov 27, 2023

Great. Thanks for the clarification 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants