Convert feed to RSS 2.0

This commit is contained in:
Devon Campbell 2022-11-29 21:04:17 -08:00
commit e98b573e91

View file

@ -4,31 +4,37 @@ eleventyExcludeFromCollections: true
date: git Last Modified
metadata:
title: devon.lol
subtitle: I write essays to no one about video games, technology, the internet, and other things in the world.
language: en
description: I write essays to no one about video games, technology, the internet, and other things in the world.
language: en-us
url: https://devon.lol/
author:
name: Devon Campbell
email: devon@devon.lol
---
<?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>{{ page.date | dateToRfc3339 }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ metadata.title }}</title>
<link>{{ permalink | absoluteUrl(metadata.url) }}</link>
<atom:link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self" type="application/rss+xml" />
<description>{{ metadata.description }}</description>
<language>{{ metadata.language }}</language>
<lastBuildDate>{{ page.date | dateToRfc822 }}</lastBuildDate>
<image>
<url>{{ '/apple-touch-icon.png' | absoluteUrl(metadata.url) }}</url>
<title>{{ metadata.title }}</title>
<link>{{ permalink | absoluteUrl(metadata.url) }}</link>
</image>
{%- for item in collections.feed | reverse -%}
<entry>
<title>{{ item.data.title }}</title>
<link href="https://devon.lol{{ item.data.relativeUrl }}"/>
<updated>{{ item.date | stringToDate | dateToRfc3339 }}</updated>
<content xml:lang="{{ metadata.language }}" type="html">{{ item.templateContent }}</content>
</entry>
{%- endfor -%}
{%- for item in collections.feed | reverse -%}
<item>
<title>{{ item.data.title }}</title>
<link>{{ item.data.relativeUrl | absoluteUrl(metadata.url)}}</link>
<pubDate>{{ item.date | stringToDate | dateToRfc822 }}</pubDate>
<guid isPermaLink="false">{{ item.date | stringToDate | dateToRfc822 }}</guid>
<description>{{ item.templateContent }}</description>
</item>
{%- endfor -%}
</channel>
</rss>