Skip to content
Permalink
Browse files

Also sort RSS feed correctly

  • Loading branch information
ralsina committed Oct 31, 2015
1 parent 2a09ede commit 62578db7a6d65555143409531fd8d4a200ff68c2
Showing with 13 additions and 0 deletions.
  1. +13 −0 nikola/plugins/task/galleries.py
@@ -596,6 +596,19 @@ def gallery_rss(self, img_list, dest_img_list, img_titles, lang, permalink, outp
def make_url(url):
return urljoin(self.site.config['BASE_URL'], url.lstrip('/'))

all_data = list(zip(img_list, dest_img_list, img_titles))

if self.kw['sort_by_date']:
all_data.sort(key=lambda a: self.image_date(a[0]))
else: # Sort by name
all_data.sort(key=lambda a: a[0])

if all_data:
img_list, dest_img_list, img_titles = zip(*all_data)
else:
img_list, dest_img_list, img_titles = [], [], []


items = []
for img, srcimg, title in list(zip(dest_img_list, img_list, img_titles))[:self.kw["feed_length"]]:
img_size = os.stat(

0 comments on commit 62578db

Please sign in to comment.
You can’t perform that action at this time.