1
0
Fork 0
forked from github/pelican

Order tag articles per date. Fix #133

This commit is contained in:
Alexis Metaireau 2011-06-12 22:18:50 +02:00
commit 7fc5fa0661

View file

@ -167,6 +167,7 @@ class ArticlesGenerator(Generator):
# and subfolders after that
tag_template = self.get_template('tag')
for tag, articles in self.tags.items():
articles.sort(key=attrgetter('date'), reverse=True)
dates = [article for article in self.dates if article in articles]
write('tag/%s.html' % tag, tag_template, self.context, tag=tag,
articles=articles, dates=dates,