fix: update rss published to pubDate
This update ensures we are following RSS spec, more info: https://www.rssboard.org/rss-specification#ltpubdategtSubelementOfLtitemgt
This commit is contained in:
parent
4286ca6980
commit
bef9f81f47
1 changed files with 16 additions and 17 deletions
33
src/rss.njk
33
src/rss.njk
|
@ -4,26 +4,25 @@ layout: null
|
||||||
eleventyExcludeFromCollections: true
|
eleventyExcludeFromCollections: true
|
||||||
excludeFromSitemap: true
|
excludeFromSitemap: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<title>{{ meta.siteName }}</title>
|
<title>{{ meta.siteName }}</title>
|
||||||
<subtitle>{{ meta.siteDescription }}</subtitle>
|
<subtitle>{{ meta.siteDescription }}</subtitle>
|
||||||
<link href="{{ meta.url }}/feed.xml" rel="self"/>
|
<link href="{{ meta.url }}/feed.xml" rel="self" />
|
||||||
<link href="{{ meta.url }}/" rel="alternate" type="text/html"/>
|
<link href="{{ meta.url }}/" rel="alternate" type="text/html" />
|
||||||
<id>{{ meta.url }}/</id>
|
<id>{{ meta.url }}/</id>
|
||||||
<author>
|
<author>
|
||||||
<name>{{ meta.author }}</name>
|
<name>{{ meta.author }}</name>
|
||||||
</author>
|
</author>
|
||||||
{% for post in collections.post %}
|
{% for post in collections.post %}
|
||||||
<entry>
|
<entry>
|
||||||
<id>{{ meta.url }}{{ post.url }}</id>
|
<id>{{ meta.url }}{{ post.url }}</id>
|
||||||
<title>{{ post.data.title | escape }}</title>
|
<title>{{ post.data.title | escape }}</title>
|
||||||
<link href="{{ meta.url }}{{ post.url }}"/>
|
<link href="{{ meta.url }}{{ post.url }}" />
|
||||||
<published>{{ post.date }}</published>
|
<pubDate>{{ post.date }}</pubDate>
|
||||||
{%- for tag in post.data.tags %}
|
{%- for tag in post.data.tags %}<category term="{{ tag }}" />{%- endfor %}
|
||||||
<category term="{{ tag }}" />
|
|
||||||
{%- endfor %}
|
|
||||||
<content type="html">{{ post.content | escape }}</content>
|
<content type="html">{{ post.content | escape }}</content>
|
||||||
</entry>
|
</entry>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</feed>
|
</feed>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue