ClickHouse/website/templates/blog/rss.xml
Ivan Blinkov e48b6b8f84
[blog] add RSS feed (#12064)
* [blog] add rss feed

* better title
2020-06-30 21:22:07 +03:00

24 lines
972 B
XML

<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>{{ config.site_name }}</title>
<link>{{ config.site_url }}</link>
<atom:link href="{{ config.site_url }}rss.xml" rel="self" type="application/rss+xml" />
<description></description>
<pubDate>{{ config.extra.today|to_rfc882 }}</pubDate>
{% for post in config.extra.post_meta.values() %}
{% set url = config.extra.website_url + post['url'] %}
<item>
<title>{{ post['title'] }}</title>
<description><![CDATA[<img src="{{ post['image'] }}" />]]></description>
<pubDate>{{ post['date']|to_rfc882 }}</pubDate>
<guid isPermaLink="true">{{ url }}</guid>
<link>{{ url }}</link>
{# TODO: <dc:creator><![CDATA[{{ post['author'] }}]]></dc:creator> #}
</item>
{% endfor %}
</channel>
</rss>