aboutsummaryrefslogtreecommitdiff
path: root/feed.njk
diff options
context:
space:
mode:
authorMarc Coquand <marcc0000@pm.me>2023-09-10 07:49:49 -0300
committerMarc Coquand <marcc0000@pm.me>2023-09-10 07:49:49 -0300
commit30a031edc5c5f161ba487822a4adb3c60a9864b1 (patch)
treea9c64d6d4059029b4554fba47d6d19e04728c1a2 /feed.njk
parent22a335754035ae9ee8d1bbdfc65ad83f8bbe834f (diff)
downloadmccd.space-30a031edc5c5f161ba487822a4adb3c60a9864b1.tar.gz
mccd.space-30a031edc5c5f161ba487822a4adb3c60a9864b1.tar.bz2
mccd.space-30a031edc5c5f161ba487822a4adb3c60a9864b1.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--feed.njk42
1 files changed, 42 insertions, 0 deletions
diff --git a/feed.njk b/feed.njk
new file mode 100644
index 0000000..dcadf9c
--- /dev/null
+++ b/feed.njk
@@ -0,0 +1,42 @@
+---json
+{
+ "permalink": "feed.xml",
+ "eleventyExcludeFromCollections": true,
+ "metadata": {
+ "title": "Mu",
+ "subtitle": "Thoughts, meditations and more.",
+ "language": "en",
+ "url": "https://u1d6b3.site",
+ "author": {
+ "name": "Marc Coquand",
+ "email": "marcc0000@pm.me"
+ }
+ }
+}
+---
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
+ <title>{{ metadata.title }}</title>
+ <subtitle>{{ metadata.subtitle }}</subtitle>
+ <link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self"/>
+ <link href="{{ metadata.url }}"/>
+ <updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
+ <id>{{ metadata.url }}</id>
+ <author>
+ <name>{{ metadata.author.name }}</name>
+ <email>{{ metadata.author.email }}</email>
+ </author>
+
+ {%- for post in collections.post | reverse %}
+ {%- set absolutePostUrl = post.url | absoluteUrl(metadata.url) %}
+ <entry>
+ <title>{{ post.data.title }}</title>
+ <link href="{{ absolutePostUrl }}"/>
+ <updated>{{ post.date | dateToRfc3339 }}</updated>
+ <id>{{ absolutePostUrl }}</id>
+ <content xml:lang="{{ metadata.language }}" type="html">
+ {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}
+ </content>
+ </entry>
+ {%- endfor %}
+</feed>