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:]