forked from github/pelican
Fix #21: Add a setting for the archive order (REVERSE_ARCHIVE_ORDER)
This commit is contained in:
parent
5748a91ad7
commit
3e9b80e993
3 changed files with 4 additions and 1 deletions
|
|
@ -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'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue