mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
56a483475b
commit
fc4b3e44d8
1 changed files with 2 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue