forked from gvwilson/tidyblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.html
33 lines (33 loc) · 1.11 KB
/
feed.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
permalink: "feed.xml"
eleventyExcludeFromCollections: true
metadata:
title: "TidyBlocks Blog"
url: "https://tidyblocks.tech"
feedUrl: "https://tidyblocks.tech/feed.xml"
author:
name: "The TidyBlocks Team"
email: "[email protected]"
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http:https://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<link href="{{ metadata.feedUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.post | map: "date" | sort | last | date: "%Y-%m-%dT%H:%M:%S"}}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.post %}
{% assign absolutePostUrl = post.url | prepend: metadata.url %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | date: "%Y-%m-%dT%H:%M:%S" }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent |strip_html | truncatewords: 50 }}</content>
</entry>
{%- endfor %}
</feed>