Commit 2797f4ae authored by berumuron's avatar berumuron
Browse files

fix: Consider force_feed option for series

parent 5c5e783f
......@@ -76,22 +76,23 @@ def main(environment):
articles.append(article)
serie_articles.append(article)
# If the directory contains a serie and there is at least one
# article, we load a feed for the serie and we let know the serie
# about its articles and feed.
if serie and serie_articles:
feed_slug = f"feeds/{dirname}"
feed_title = f"{serie.title()} - {configuration['SITE_TITLE']}"
serie_feed = Feed(
feed_slug,
serie_articles,
{"title": feed_title, "site_link": serie.url()},
configuration=configuration,
)
feeds.append(serie_feed)
if serie:
# If the directory contains a serie, we load a feed for the serie
# and we let know the serie about its articles and feed.
serie.set_articles(serie_articles)
serie.set_feed(serie_feed)
if serie_articles or configuration.get("SITE_FORCE_FEED", False):
feed_slug = f"feeds/{dirname}"
feed_title = f"{serie.title()} - {configuration['SITE_TITLE']}"
serie_feed = Feed(
feed_slug,
serie_articles,
{"title": feed_title, "site_link": serie.url()},
configuration=configuration,
)
feeds.append(serie_feed)
serie.set_feed(serie_feed)
# Load a "blog" page which has access to the list of articles
blog_template_filepath = os.path.join("templates", "blog.html")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment