Skip to content

Commit

Permalink
better describe sort option in md file
Browse files Browse the repository at this point in the history
  • Loading branch information
saimn committed Apr 2, 2024
1 parent 114f4e2 commit 3296271
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/album_information.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ gallery:
represent the gallery.
- *Author*: the author of the gallery, if present it is used instead of the
author setting.
- *Sort*: the sort order for this album. If prefixed with a '-' it will be in
reversed order.
- *Sort*: the sort order for the sub-albums of this album. If prefixed with
a '-' it will be in reversed order. Not supported to sort medias.

Any additional meta-data is available in the templates. For instance::

Expand Down
1 change: 1 addition & 0 deletions src/sigal/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def sort_subdirs(self, albums_sort_attr):
reverse = self.settings["albums_sort_reverse"]

if "sort" in self.meta:
# override default sort order from settings
albums_sort_attr = self.meta["sort"][0]
if albums_sort_attr[0] == "-":
albums_sort_attr = albums_sort_attr[1:]
Expand Down

0 comments on commit 3296271

Please sign in to comment.