Print the pubdate RSS provides us with

This commit is contained in:
benjamin melançon 2019-01-17 15:02:04 -05:00
parent 49713f7af1
commit bd9add651f

View file

@ -23,10 +23,22 @@
<title>{{ title }}</title> <title>{{ title }}</title>
<link>{{ link }}</link> <link>{{ link }}</link>
<guid isPermaLink="true">{{ link }}</guid> <guid isPermaLink="true">{{ link }}</guid>
{% for item in item_elements -%}
{# The only Rss.php-provided element that we aren't overriding is pubDate #}
{# TODO when online look up if there's an elegant way to filter a for loop #}
{% if item.key == 'pubDate' %}
<{{ item.key }}{{ item.attributes -}}
{% if item.value -%}
>{{ item.value }}</{{ item.key }}>
{% else -%}
{{ ' />' }}
{% endif %}
{% endif %}
{%- endfor %}
<comments>{{ link }}#comments</comments> <comments>{{ link }}#comments</comments>
{# The RSS Teaser view mode *must* be configured to output the body paragraph {# The RSS Teaser view mode *must* be configured to output the body paragraph
(summary) LAST; see below for why. #} (summary) LAST; see below for why. #}
{{ description|render|raw }} {{ description }}
<a href="{{ item.node.url }}">Read more and discuss at agaric.coop.</a> <a href="{{ item.node.url }}">Read more and discuss at agaric.coop.</a>
{# Opening description tag is in paragraph template used for description, {# Opening description tag is in paragraph template used for description,
see field/field--field-body-paragraph--rss-teaser.html.twig and only the see field/field--field-body-paragraph--rss-teaser.html.twig and only the