Convert feed to RSS 2.0
This commit is contained in:
parent
c21adf4f7d
commit
e98b573e91
1 changed files with 27 additions and 21 deletions
48
src/feed.njk
48
src/feed.njk
|
|
@ -4,31 +4,37 @@ eleventyExcludeFromCollections: true
|
||||||
date: git Last Modified
|
date: git Last Modified
|
||||||
metadata:
|
metadata:
|
||||||
title: devon.lol
|
title: devon.lol
|
||||||
subtitle: I write essays to no one about video games, technology, the internet, and other things in the world.
|
description: I write essays to no one about video games, technology, the internet, and other things in the world.
|
||||||
language: en
|
language: en-us
|
||||||
url: https://devon.lol/
|
url: https://devon.lol/
|
||||||
author:
|
author:
|
||||||
name: Devon Campbell
|
name: Devon Campbell
|
||||||
email: devon@devon.lol
|
email: devon@devon.lol
|
||||||
---
|
---
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<title>{{ metadata.title }}</title>
|
<channel>
|
||||||
<subtitle>{{ metadata.subtitle }}</subtitle>
|
<title>{{ metadata.title }}</title>
|
||||||
<link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self"/>
|
<link>{{ permalink | absoluteUrl(metadata.url) }}</link>
|
||||||
<link href="{{ metadata.url }}"/>
|
<atom:link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self" type="application/rss+xml" />
|
||||||
<updated>{{ page.date | dateToRfc3339 }}</updated>
|
<description>{{ metadata.description }}</description>
|
||||||
<id>{{ metadata.url }}</id>
|
<language>{{ metadata.language }}</language>
|
||||||
<author>
|
<lastBuildDate>{{ page.date | dateToRfc822 }}</lastBuildDate>
|
||||||
<name>{{ metadata.author.name }}</name>
|
<image>
|
||||||
<email>{{ metadata.author.email }}</email>
|
<url>{{ '/apple-touch-icon.png' | absoluteUrl(metadata.url) }}</url>
|
||||||
</author>
|
<title>{{ metadata.title }}</title>
|
||||||
|
<link>{{ permalink | absoluteUrl(metadata.url) }}</link>
|
||||||
|
</image>
|
||||||
|
|
||||||
{%- for item in collections.feed | reverse -%}
|
{%- for item in collections.feed | reverse -%}
|
||||||
<entry>
|
<item>
|
||||||
<title>{{ item.data.title }}</title>
|
<title>{{ item.data.title }}</title>
|
||||||
<link href="https://devon.lol{{ item.data.relativeUrl }}"/>
|
<link>{{ item.data.relativeUrl | absoluteUrl(metadata.url)}}</link>
|
||||||
<updated>{{ item.date | stringToDate | dateToRfc3339 }}</updated>
|
<pubDate>{{ item.date | stringToDate | dateToRfc822 }}</pubDate>
|
||||||
<content xml:lang="{{ metadata.language }}" type="html">{{ item.templateContent }}</content>
|
<guid isPermaLink="false">{{ item.date | stringToDate | dateToRfc822 }}</guid>
|
||||||
</entry>
|
<description>{{ item.templateContent }}</description>
|
||||||
{%- endfor -%}
|
</item>
|
||||||
|
|
||||||
|
{%- endfor -%}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue