From 3296271e9c7a857cb6a10881e3a2225b82a84a55 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 2 Apr 2024 21:39:07 +0200 Subject: [PATCH] better describe sort option in md file --- docs/album_information.rst | 4 ++-- src/sigal/gallery.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/album_information.rst b/docs/album_information.rst index 4873826..c7b4612 100644 --- a/docs/album_information.rst +++ b/docs/album_information.rst @@ -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:: diff --git a/src/sigal/gallery.py b/src/sigal/gallery.py index 4ffd83c..8adfabb 100644 --- a/src/sigal/gallery.py +++ b/src/sigal/gallery.py @@ -486,6 +486,7 @@ class Album: 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:]