mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'pr/555'
Conflicts: pelican/contents.py
This commit is contained in:
commit
c787e02dcc
4 changed files with 10 additions and 10 deletions
|
|
@ -358,7 +358,9 @@ class ArticlesGenerator(Generator):
|
|||
for article in self.articles:
|
||||
# only main articles are listed in categories, not translations
|
||||
self.categories[article.category].append(article)
|
||||
self.authors[article.author].append(article)
|
||||
# ignore blank authors as well as undefined
|
||||
if hasattr(article,'author') and article.author.name != '':
|
||||
self.authors[article.author].append(article)
|
||||
|
||||
# sort the articles by date
|
||||
self.articles.sort(key=attrgetter('date'), reverse=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue