bun-activitypub/_content/atom.njk

36 lines
1.2 KiB
Text
Raw Normal View History

---json
{
"layout": null,
"permalink": "atom.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 %}
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ ACTOR.url }}">
<title>{{ ACTOR.name }}'s feed</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ permalink | absoluteUrl(ACTOR.url) }}" rel="self"/>
2023-10-02 22:19:23 +00:00
<updated>{{ collections.feed[0].date | dateToRfc3339 }}</updated>
<id>{{ ACTOR.id | absoluteUrl(ACTOR.url) }}</id>
<author>
<name>{{ ACTOR.name }}</name>
</author>
{%- for post in collections.feed %}
{%- set absolutePostUrl = post.url | absoluteUrl(ACTOR.url) %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
2023-10-02 22:19:23 +00:00
<updated>{{ post.data.published | dateObj | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content xml:lang="{{ metadata.language }}" type="html">
{{ summaryMacro(post.data, post.url) | htmlToAbsoluteUrls(absolutePostUrl) }}
{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}
</content>
</entry>
{%- endfor %}
</feed>