1
0
Fork 0
This commit is contained in:
Ava Gaiety W 2023-10-02 09:21:00 -07:00
parent d4f19b7f4a
commit d97f2343dc
3 changed files with 42 additions and 2 deletions

View file

@ -134,6 +134,7 @@
},
"active": "7212df225ebf759a",
"lastOpenFiles": [
"content/tils/feed.njk",
"content/tils/struct_pattern_matching.md",
"content/tils/pdf_obsidian_at_page.md",
"content/tils/asdf_direnv.md",
@ -169,7 +170,6 @@
"node_modules/slugify/CHANGELOG.md",
"node_modules/markdown-it/node_modules/entities/readme.md",
"node_modules/liquidjs/node_modules/commander/Readme.md",
"node_modules/minipass/node_modules/yallist/README.md",
"_site/images/ultimate-dungeon-terrain-3.jpg",
"_site/images/ultimate-dungeon-terrain-2.jpg",
"_site/images/ultimate-dungeon-terrain-1.jpg",

View file

@ -45,7 +45,8 @@
href="https://gitlab.com/gaiety/gaiety-life" class="underline">fork it here</a>.
</div>
<div>
<a href="/feed.xml" class="underline">Subscribe to RSS</a>
<a href="/feed.xml" class="underline">RSS</a>,
<a href="/til/feed.xml" class="underline">TIL RSS</a>
</div>
</footer>
</div>

39
content/tils/feed.njk Normal file
View file

@ -0,0 +1,39 @@
---json
{
"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "Gaiety's Life",
"subtitle": "Programming, art, design, and other queer things.",
"url": "https://gaiety.life/",
"feedUrl": "https://gaiety.life/feed.xml",
"author": {
"name": "Ava Gaiety W.",
"email": "ava@wroten.me"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ metadata.feedUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.all | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.tils %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>