forked from github/pelican
The all Atom and RSS feed generators should include all articles, regardless of the article's language or the site's. Fixes #550.
This commit is contained in:
parent
d6ec9b2028
commit
721a422e5e
1 changed files with 10 additions and 2 deletions
|
|
@ -164,12 +164,20 @@ class ArticlesGenerator(Generator):
|
|||
'Feeds generated without SITEURL set properly may not be valid'
|
||||
)
|
||||
|
||||
# Isuue #550: FEED_ATOM and FEED_RSS should include all articles, regardless of the language
|
||||
all_articles = list(self.articles)
|
||||
|
||||
for article in self.articles:
|
||||
all_articles.extend(article.translations)
|
||||
|
||||
all_articles.sort(key=attrgetter('date'), reverse=True)
|
||||
|
||||
if self.settings.get('FEED_ATOM'):
|
||||
writer.write_feed(self.articles, self.context,
|
||||
writer.write_feed(all_articles, self.context,
|
||||
self.settings['FEED_ATOM'])
|
||||
|
||||
if self.settings.get('FEED_RSS'):
|
||||
writer.write_feed(self.articles, self.context,
|
||||
writer.write_feed(all_articles, self.context,
|
||||
self.settings['FEED_RSS'], feed_type='rss')
|
||||
|
||||
for cat, arts in self.categories:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue