mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Test for FEED & FEED_RSS before generation.
Then we bypass all feed generation of both are set to None or throw a warning if SITEURL is unset. Updated all documentation, to make sure the usage and warning is clear.
This commit is contained in:
parent
f4ab1b2cd0
commit
d9817f9a96
4 changed files with 29 additions and 2 deletions
|
|
@ -124,6 +124,12 @@ class ArticlesGenerator(Generator):
|
|||
|
||||
def generate_feeds(self, writer):
|
||||
"""Generate the feeds from the current context, and output files."""
|
||||
if self.settings.get('FEED') is None and self.settings.get('FEED_RSS') is None:
|
||||
return
|
||||
elif self.settings.get('SITEURL') is '':
|
||||
logger.warning(
|
||||
'Feeds generated without SITEURL set properly may not be vaild'
|
||||
)
|
||||
|
||||
if self.settings.get('FEED'):
|
||||
writer.write_feed(self.articles, self.context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue