date to xmlschema

This commit is contained in:
Sakrecoer 2023-12-07 01:04:18 +01:00
parent 2432def0e7
commit 8a70dc053c

View file

@ -13,13 +13,13 @@
<sy:updateFrequency>{{ site.feed_update_frequency | default: 1 | xml_escape }}</sy:updateFrequency> <sy:updateFrequency>{{ site.feed_update_frequency | default: 1 | xml_escape }}</sy:updateFrequency>
<link>{{ site.url }}/wim.xml</link> <link>{{ site.url }}/wim.xml</link>
<atom:link href="{{ site.url }}/{{ page.path }}" rel="self" type="application/rss+xml" /> <atom:link href="{{ site.url }}/{{ page.path }}" rel="self" type="application/rss+xml" />
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate> <lastBuildDate>{{ site.time | date_to_xmlschema }}</lastBuildDate>
{% assign feed_items = site.feed_items | default: 10 %}{% for post in site.data.wim.wim reversed %}{% assign sitetimexml = site.time | date: "%s" %}{% assign now = post.date | date: "%s" %}{% if now <= sitetimexml %} {% assign feed_items = site.feed_items | default: 10 %}{% for post in site.data.wim.wim reversed %}{% assign sitetimexml = site.time | date: "%s" %}{% assign now = post.date | date: "%s" %}{% if now <= sitetimexml %}
<item> <item>
<title>{{ post.name | xml_escape }}</title> <title>{{ post.name | xml_escape }}</title>
{% if post.author.name %}<dc:creator>{{ post.author.name | xml_escape }}</dc:creator>{% endif %} {% if post.author.name %}<dc:creator>{{ post.author.name | xml_escape }}</dc:creator>{% endif %}
{% if post.excerpt %}<description>{{ post.excerpt | xml_escape }}</description>{% else %}<description>{{ post.content | xml_escape }}</description>{% endif %} {% if post.excerpt %}<description>{{ post.excerpt | xml_escape }}</description>{% else %}<description>{{ post.content | xml_escape }}</description>{% endif %}
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate> <pubDate>{{ post.date | date_to_xmlschema }}</pubDate>
<link>{{ post.link }}</link> <link>{{ post.link }}</link>
<guid isPermaLink="false">{{ now }}</guid> <guid isPermaLink="false">{{ now }}</guid>
</item>{% endif %}{% endfor %} </item>{% endif %}{% endfor %}