deblan.tv/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig

32 lines
1,014 B
Twig

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Deblan - Blog</title>
<link>http://www.deblan.io/</link>
<description>Deblan - Blog</description>
<language>fr</language>
{% for post in page.pager %}
<item>
<title><![CDATA[{{ post.title|raw }}]]></title>
<link>{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }}</link>
<description>
<![CDATA[
{% if post.contentFormat == 'html' %}
{{ post.content|post|transform_url }}
{% endif %}
{% if post.contentFormat == 'markdown' %}
{{ post.content|markdown|transform_url }}
{% endif %}
]]></description>
<guid isPermaLink="false">{{ post.id }}</guid>
<pubDate>{{ post.publishedAt|date('r') }}</pubDate>
{% for category in post.categories %}
<category><![CDATA[{{ category.title }}]]></category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>