Make use of SITESUBTITLE setting also in Atom feeds.

For some reason, feedgenerator.py uses the `description` argument only
for RSS and the `subtitle` argument only for Atom. So setting both to
the same value.

In order to avoid unnecessary changes, if SITESUBTITLE is not present,
the subtitle is set to None instead of '', so the generated Atom feed
doesn't contain an empty <subtitle></subtitle> tag (in contrast, the RSS
feed contains an empty <description></description> tag now, though).
This commit is contained in:
Vladimír Vondruš 2017-10-29 20:31:09 +01:00
commit fc4b3e44d8

View file

@ -40,7 +40,8 @@ class Writer(object):
title=Markup(feed_title).striptags(),
link=(self.site_url + '/'),
feed_url=self.feed_url,
description=context.get('SITESUBTITLE', ''))
description=context.get('SITESUBTITLE', ''),
subtitle=context.get('SITESUBTITLE', None))
return feed
def _add_item_to_the_feed(self, feed, item):