Add RSS feed
This commit is contained in:
parent
8a61cde474
commit
fea73f220d
4 changed files with 398 additions and 1 deletions
43
src/feed.njk
Normal file
43
src/feed.njk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
permalink: feed.xml
|
||||
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
|
||||
url: https://devon.lol/
|
||||
author:
|
||||
name: Devon Campbell
|
||||
email: devon@devon.lol
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
{% macro addEntry(title, relativeUrl, dateString, content) %}
|
||||
{# When invoking this, use ";isotime" to insert a compatible dateString with espanso #}
|
||||
{% set absoluteUrl = metadata.url + relativeUrl %}
|
||||
<entry>
|
||||
<title>{{ title }}</title>
|
||||
<link href="{{ absoluteUrl }}"/>
|
||||
<updated>{{ dateString | makeRfc822Date }}</updated>
|
||||
<id>{{ absoluteUrl }}</id>
|
||||
<content xml:lang="{{ metadata.language }}" type="html">{{ content }}</content>
|
||||
</entry>
|
||||
{% endmacro %}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
|
||||
<title>{{ metadata.title }}</title>
|
||||
<subtitle>{{ metadata.subtitle }}</subtitle>
|
||||
<link href="{{ permalink }}" rel="self"/>
|
||||
<link href="{{ metadata.url }}"/>
|
||||
<updated>{{ page.date | makeRfc822Date }}</updated>
|
||||
<id>{{ metadata.url }}</id>
|
||||
<author>
|
||||
<name>{{ metadata.author.name }}</name>
|
||||
<email>{{ metadata.author.email }}</email>
|
||||
</author>
|
||||
{{ addEntry(
|
||||
'Site Launch!',
|
||||
'',
|
||||
'2022-11-27T10:39:47.547655-08:00',
|
||||
"This is the first personal site I've made in probably 15 years. It's great to be back!"
|
||||
) }}
|
||||
</feed>
|
||||
Loading…
Add table
Add a link
Reference in a new issue