Skip to content
Permalink
Browse files
Insertion order wasn’t a bad idea after all (for py3.6 at least)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 19, 2018
1 parent d426ddf commit 6fe20fc9cd225229a30441e4bb68b0c2caf844f3
Showing with 3 additions and 4 deletions.
  1. +3 −4 nikola/plugins/task/galleries.py
@@ -620,8 +620,7 @@ def render_gallery_index(
context,
img_list,
img_titles,
thumbs,
file_dep):
thumbs):
"""Build the gallery index."""
# The photo array needs to be created here, because
# it relies on thumbnails already being created on
@@ -672,10 +671,10 @@ def url_from_path(p):
# Do we have any orphan entries from metadata.yml, or
# are the files from the gallery not listed in metadata.yml?
if photo_info:
for entry in sorted(photo_info):
for entry in photo_info:
photo_array.append(photo_info[entry])
else:
for entry in sorted(photo_info):
for entry in photo_info:
photo_array.append(photo_info[entry])

context['photo_array'] = photo_array

0 comments on commit 6fe20fc

Please sign in to comment.