feat: created rss feed
This commit is contained in:
parent
0152503a52
commit
b56461b237
3 changed files with 38 additions and 0 deletions
28
feed.njk
Normal file
28
feed.njk
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
permalink: /feed.xml
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Volpe</title>
|
||||
<link>{{ site.url }}/</link>
|
||||
<description>Blog posts from Volpe</description>
|
||||
<language>en</language>
|
||||
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml"/>
|
||||
{%- for post in collections.posts | reverse %}
|
||||
<item>
|
||||
<title>{{ post.data.title | escape }}</title>
|
||||
<link>{{ site.url }}{{ post.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
|
||||
<pubDate>{{ post.data.createdAt.toRFC2822() }}</pubDate>
|
||||
{%- if post.data.updatedAt %}
|
||||
<atom:updated>{{ post.data.updatedAt.toISO() }}</atom:updated>
|
||||
{%- endif %}
|
||||
{%- if post.data.description %}
|
||||
<description><![CDATA[{{ post.data.description }}]]></description>
|
||||
{%- endif %}
|
||||
</item>
|
||||
{%- endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
Loading…
Add table
Add a link
Reference in a new issue