]> Witch of Git - web/blog/blob - feed.njk
Add the Gundam III theater post
[web/blog] / feed.njk
1 ---
2 permalink: feed.xml
3 # The excludeFromCollections seems to be necessary here to avoid "tried to use templateContent too early" but I don't know why
4 # This doesn't seem like it should be necessary, but I get issues with `serve` when I don't have it
5 # From https://github.com/11ty/eleventy/issues/3136
6 eleventyExcludeFromCollections:
7 collections: ["posts"]
8 eleventyImport:
9 collections: ["posts"]
10 metadata:
11 title: Witch of Light
12 url: https://blog.witchoflight.com/
13 base: https://blog.witchoflight.com/
14 author:
15 name: Cassie Jones
16 email: cassie+blog@witchoflight.com
17 feed:
18 subtitle: A collection of Cassie's harebrained schemes.
19 filename: feed.xml
20 path: feed/feed.xml
21 url: https://blog.witchoflight.com/feed.xml
22 id: https://blog.witchoflight.com/
23 ---
24 <?xml version="1.0" encoding="utf-8"?>
25 <feed xmlns="http://www.w3.org/2005/Atom">
26 <title>{{ metadata.title }}</title>
27 <subtitle>{{ metadata.feed.subtitle }}</subtitle>
28 <link href="{{ metadata.feed.url }}" rel="self"/>
29 <link href="{{ metadata.url }}"/>
30 <updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
31 <id>{{ metadata.feed.id }}</id>
32 <author>
33 <name>{{ metadata.author.name }}</name>
34 <email>{{ metadata.author.email }}</email>
35 </author>
36 {%- for post in collections.posts | reverse %}
37 {% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
38 <entry>
39 <title>{{ post.data.title }}</title>
40 <link href="{{ absolutePostUrl }}"/>
41 <published>{{ post.data.published | toRfc3339 }}</published>
42 <updated>
43 {%- if post.data.updated %}{{ post.data.updated | toRfc3339 }}
44 {%- else %}{{ post.data.published | toRfc3339 }}
45 {%- endif -%}
46 </updated>
47 <id>{{ absolutePostUrl }}</id>
48 <content type="html">{{ post.templateContent | renderTransforms(post.data.page, metadata.base) }}</content>
49 </entry>
50 {%- endfor %}
51 </feed>