mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Order tag articles per date. Fix #133
This commit is contained in:
parent
086df21ce7
commit
7fc5fa0661
1 changed files with 1 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ class ArticlesGenerator(Generator):
|
||||||
# and subfolders after that
|
# and subfolders after that
|
||||||
tag_template = self.get_template('tag')
|
tag_template = self.get_template('tag')
|
||||||
for tag, articles in self.tags.items():
|
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]
|
dates = [article for article in self.dates if article in articles]
|
||||||
write('tag/%s.html' % tag, tag_template, self.context, tag=tag,
|
write('tag/%s.html' % tag, tag_template, self.context, tag=tag,
|
||||||
articles=articles, dates=dates,
|
articles=articles, dates=dates,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue