Browse Source

better describe sort option in md file

pull/516/head
Simon Conseil 2 years ago
parent
commit
3296271e9c
  1. 4
      docs/album_information.rst
  2. 1
      src/sigal/gallery.py

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

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

Loading…
Cancel
Save