templates/blog/index.xml.twig line 7

Open in your IDE?
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <rss version="2.0">
  3.     <channel>
  4.         <title>{{ 'rss.title'|trans }}</title>
  5.         <description>{{ 'rss.description'|trans }}</description>
  6.         <pubDate>{{ 'now'|date('r', timezone='GMT') }}</pubDate>
  7.         <lastBuildDate>{{ (posts|last).publishedAt|default('now')|date('r', timezone='GMT') }}</lastBuildDate>
  8.         <link>{{ url('blog_index') }}</link>
  9.         <language>{{ app.request.locale }}</language>
  10.         {% for post in posts %}
  11.             <item>
  12.                 <title>{{ post.title }}</title>
  13.                 <description>{{ post.summary }}</description>
  14.                 <link>{{ url('blog_post', {'slug': post.slug}) }}</link>
  15.                 <guid>{{ url('blog_post', {'slug': post.slug}) }}</guid>
  16.                 <pubDate>{{ post.publishedAt|date(format='r', timezone='GMT') }}</pubDate>
  17.                 <author>{{ post.author.email }}</author>
  18.                 {% for tag in post.tags %}
  19.                     <category>{{ tag.name }}</category>
  20.                 {% endfor %}
  21.             </item>
  22.         {% endfor %}
  23.     </channel>
  24. </rss>