diff --git a/madblog/routes.py b/madblog/routes.py index 4b6f017..9a42ff7 100644 --- a/madblog/routes.py +++ b/madblog/routes.py @@ -115,8 +115,12 @@ def article_route(article: str): @app.route("/rss", methods=["GET"]) def rss_route(): - pages = app.get_pages(with_content=True, skip_header=True, skip_html_head=True) - short_description = "short" in request.args + short_description = "short" in request.args or config.short_feed + pages = app.get_pages( + with_content=not short_description, + skip_header=True, + skip_html_head=True, + ) return Response( """ @@ -149,20 +153,17 @@ def rss_route(): ), items="\n\n".join( [ - """ + ( + """ {title} {base_link}{link} - {published}""" - + ( - "" - if not config.short_feed - else "" - ) - + """ + {published} + - """.format( + """ + ).format( base_link=config.link, title=page.get("title", "[No Title]"), link=page.get("uri", ""),