Compare commits
2 commits
34b187d0d4
...
609dd14d90
Author | SHA1 | Date | |
---|---|---|---|
609dd14d90 | |||
958f4106cc |
4 changed files with 16 additions and 14 deletions
|
@ -1 +1 @@
|
||||||
__version__ = '0.2.19'
|
__version__ = '0.2.20'
|
||||||
|
|
|
@ -115,8 +115,12 @@ def article_route(article: str):
|
||||||
|
|
||||||
@app.route("/rss", methods=["GET"])
|
@app.route("/rss", methods=["GET"])
|
||||||
def rss_route():
|
def rss_route():
|
||||||
pages = app.get_pages(with_content=True, skip_header=True, skip_html_head=True)
|
short_description = "short" in request.args or config.short_feed
|
||||||
short_description = "short" in request.args
|
pages = app.get_pages(
|
||||||
|
with_content=not short_description,
|
||||||
|
skip_header=True,
|
||||||
|
skip_html_head=True,
|
||||||
|
)
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
"""<?xml version="1.0" encoding="UTF-8" ?>
|
"""<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
@ -149,20 +153,17 @@ def rss_route():
|
||||||
),
|
),
|
||||||
items="\n\n".join(
|
items="\n\n".join(
|
||||||
[
|
[
|
||||||
|
(
|
||||||
"""
|
"""
|
||||||
<item>
|
<item>
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
<link>{base_link}{link}</link>
|
<link>{base_link}{link}</link>
|
||||||
<pubDate>{published}</pubDate>"""
|
<pubDate>{published}</pubDate>
|
||||||
+ (
|
<description><![CDATA[{content}]]></description>
|
||||||
"<description><![CDATA[{content}]]></description>"
|
|
||||||
if not config.short_feed
|
|
||||||
else ""
|
|
||||||
)
|
|
||||||
+ """
|
|
||||||
<media:content medium="image" url="{base_link}{image}" width="200" height="150" />
|
<media:content medium="image" url="{base_link}{image}" width="200" height="150" />
|
||||||
</item>
|
</item>
|
||||||
""".format(
|
"""
|
||||||
|
).format(
|
||||||
base_link=config.link,
|
base_link=config.link,
|
||||||
title=page.get("title", "[No Title]"),
|
title=page.get("title", "[No Title]"),
|
||||||
link=page.get("uri", ""),
|
link=page.get("uri", ""),
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.2.19
|
current_version = 0.2.20
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
description-file = README.md
|
description-file = README.md
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -11,7 +11,7 @@ def readfile(file):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='madblog',
|
name='madblog',
|
||||||
version='0.2.19',
|
version='0.2.20',
|
||||||
author='Fabio Manganiello',
|
author='Fabio Manganiello',
|
||||||
author_email='info@fabiomanganiello.com',
|
author_email='info@fabiomanganiello.com',
|
||||||
description='A minimal platform for Markdown-based blogs',
|
description='A minimal platform for Markdown-based blogs',
|
||||||
|
|
Loading…
Reference in a new issue