bun-activitypub/_content/rss.njk

37 lines
1.3 KiB
Text
Raw Permalink Normal View History

---js
{
"layout": null,
"permalink": "rss.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"subtitle": "A feed of all my posts on the fediverse",
"language": "en"
}
}
---
<?xml version="1.0" encoding="utf-8"?>
{% from "macro-summary.njk" import summaryMacro %}
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ ACTOR.url }}" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ ACTOR.name }}'s feed</title>
<link>{{ ACTOR.url }}</link>
<atom:link href="{{ permalink | absoluteUrl(ACTOR.url) }}" rel="self" type="application/rss+xml" />
<description>{{ metadata.subtitle }}</description>
<language>{{ metadata.language }}</language>
{%- for post in collections.feed | reverse %}
{%- set absolutePostUrl = post.url | absoluteUrl(ACTOR.url) %}
<item>
<title>{{ post.data.title }}</title>
<link>{{ absolutePostUrl }}</link>
<description>
{{ summaryMacro(post.data, post.url) | htmlToAbsoluteUrls(absolutePostUrl) }}
{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}
</description>
2023-10-02 22:19:23 +00:00
<pubDate>{{ post.data.published | dateObj | dateToRfc822 }}</pubDate>
<dc:creator>{{ ACTOR.name }}</dc:creator>
<guid>{{ absolutePostUrl }}</guid>
</item>
{%- endfor %}
</channel>
</rss>