feat: consolidate all feeds into a single template and normalize inputs
This commit is contained in:
parent
638f784eb7
commit
517e849ef5
18 changed files with 104 additions and 154 deletions
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/assets/feeds/template.xsl" type="text/xsl" media="screen"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>
|
||||
{% block title %}Books • Cory Dransfeldt{% endblock %}
|
||||
</title>
|
||||
<link href="{{ site.url }}/books.xml" rel="self" />
|
||||
<link href="{{ site.url }}" />
|
||||
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" />
|
||||
<updated>{% block update %}{{ books[0].dateAdded | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %}</updated>
|
||||
<id>{{ site.url }}</id>
|
||||
<author>
|
||||
<name>{{ site.name }}</name>
|
||||
<email>{{ site.email }}</email>
|
||||
</author>
|
||||
<generator uri="https://11ty.dev" version="{{ eleventy.version }}">{{ eleventy.generator }}</generator>
|
||||
{% block entries %}{% endblock %}
|
||||
</feed>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/assets/feeds/template.xsl" type="text/xsl" media="screen"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>
|
||||
{% block title %}All posts • Cory Dransfeldt{% endblock %}
|
||||
</title>
|
||||
<link href="{{ site.url }}/feeds/posts" rel="self" />
|
||||
<link href="{{ site.url }}" />
|
||||
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" />
|
||||
<updated>{% block update %}{{ collections.posts[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %}</updated>
|
||||
<id>{{ site.url }}/</id>
|
||||
<author>
|
||||
<name>{{ site.name }}</name>
|
||||
<email>{{ site.email }}</email>
|
||||
</author>
|
||||
<generator uri="https://11ty.dev" version="{{ eleventy.version }}">{{ eleventy.generator }}</generator>
|
||||
{% block entries %}{% endblock %}
|
||||
</feed>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/assets/feeds/template.xsl" type="text/xsl" media="screen"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>
|
||||
{% block title %}Follow • Cory Dransfeldt{% endblock %}
|
||||
</title>
|
||||
<link href="{{ site.url }}/follow.xml" rel="self" />
|
||||
<link href="{{ site.url }}" />
|
||||
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" />
|
||||
<updated>{% block update %}{{ follow.posts[0].date_published | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %}</updated>
|
||||
<id>{{ site.url }}</id>
|
||||
<author>
|
||||
<name>{{ site.name }}</name>
|
||||
<email>{{ site.email }}</email>
|
||||
</author>
|
||||
<generator uri="https://11ty.dev" version="{{ eleventy.version }}">{{ eleventy.generator }}</generator>
|
||||
{% block entries %}{% endblock %}
|
||||
</feed>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/assets/feeds/template.xsl" type="text/xsl" media="screen"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>
|
||||
{% block title %}Links • Cory Dransfeldt{% endblock %}
|
||||
</title>
|
||||
<link href="{{ site.url }}/links.xml" rel="self" />
|
||||
<link href="{{ site.url }}" />
|
||||
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" />
|
||||
<updated>{% block update %}{{ links[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %}</updated>
|
||||
<id>{{ site.url }}</id>
|
||||
<author>
|
||||
<name>{{ site.name }}</name>
|
||||
<email>{{ site.email }}</email>
|
||||
</author>
|
||||
<generator uri="https://11ty.dev" version="{{ eleventy.version }}">{{ eleventy.generator }}</generator>
|
||||
{% block entries %}{% endblock %}
|
||||
</feed>
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<div class="min-h-screen flex flex-col">
|
||||
<main class="flex-1 w-10/12 max-w-screen-sm md:max-w-screen-md mx-auto">
|
||||
{{ content }}
|
||||
|
|
26
src/_includes/partials/feeds/content.liquid
Normal file
26
src/_includes/partials/feeds/content.liquid
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/assets/feeds/template.xsl" type="text/xsl" media="screen"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
{% assign entries = data | normalizeEntries %}
|
||||
<title>{{ title }}</title>
|
||||
<link href="{{ site.url }}{{ permalink }}" rel="self" />
|
||||
<link href="{{ site.url }}" />
|
||||
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" />
|
||||
<updated>{{ updated | date: "%Y-%m-%dT%H:%M:%S-08:00" }}</updated>
|
||||
<id>{{ site.url }}</id>
|
||||
<author>
|
||||
<name>{{ site.name }}</name>
|
||||
<email>{{ site.email }}</email>
|
||||
</author>
|
||||
<generator uri="https://11ty.dev" version="{{ eleventy.version }}">{{ eleventy.generator }}</generator>
|
||||
{% for entry in entries limit: 20 -%}
|
||||
<entry>
|
||||
<title>{{ entry.title | escape }}</title>
|
||||
<link href="{{ entry.url | stripUtm | encodeAmp }}" />
|
||||
<updated>{{ entry.date | date: "%m.%d.%Y" }}</updated>
|
||||
<id>{{ entry.url | stripUtm | encodeAmp }}</id>
|
||||
<content type="html">
|
||||
</content>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
Reference in a new issue