1
0
Fork 0
forked from github/pelican

Fix #21: Add a setting for the archive order (REVERSE_ARCHIVE_ORDER)

This commit is contained in:
Alexis Metaireau 2010-12-14 15:55:26 +00:00
commit 3e9b80e993
3 changed files with 4 additions and 1 deletions

View file

@ -158,7 +158,7 @@ class ArticlesGenerator(Generator):
# sort the articles by date
self.articles.sort(key=attrgetter('date'), reverse=True)
self.dates = list(self.articles)
self.dates.sort(key=attrgetter('date'))
self.dates.sort(key=attrgetter('date'), reverse=self.context['REVERSE_ARCHIVE_ORDER'])
# and generate the output :)
self._update_context(('articles', 'dates', 'tags', 'categories'))