feat: feedpress plus cleanup

This commit is contained in:
Cory Dransfeldt 2023-09-04 14:47:29 -07:00
parent cc0a934f88
commit 29d3042f63
16 changed files with 32 additions and 107 deletions

View file

@ -12,7 +12,7 @@ jobs:
- name: Get RSS Feed - name: Get RSS Feed
uses: kohrongying/readme-the-rss@master uses: kohrongying/readme-the-rss@master
with: with:
feed_url: https://coryd.dev/feed.xml feed_url: https://coryd.dev/feeds/posts
count: 5 count: 5
- name: Commit file changes - name: Commit file changes
run: | run: |

View file

@ -1,7 +1,3 @@
# feeds
/rss.xml /feed.xml 301!
/feeds/all.xml /feed.xml 301!
# mastodon # mastodon
/.well-known/host-meta* https://social.lol/.well-known/host-meta:splat 301 /.well-known/host-meta* https://social.lol/.well-known/host-meta:splat 301
/.well-known/nodeinfo* https://social.lol/.well-known/nodeinfo:splat 301 /.well-known/nodeinfo* https://social.lol/.well-known/nodeinfo:splat 301
@ -48,6 +44,18 @@
# netlify app domain # netlify app domain
https://cdme.netlify.app https://coryd.dev 301! https://cdme.netlify.app https://coryd.dev 301!
# feeds
/rss.xml https://feedpress.me/coryd 301!
/feeds/all.xml https://feedpress.me/coryd 301!
/feed.xml https://feedpress.me/coryd
/feed.json https://feedpress.me/coryd.json
/links.xml https://feedpress.me/coryd-links
/links.json https://feedpress.me/coryd-links.json
/books.xml https://feedpress.me/coryd-books
/books.json https://feedpress.me/coryd-books.json
/follow.xml https://feedpress.me/coryd-follow
/follow.json https://feedpress.me/coryd-follow.json
# analytics # analytics
/4afe62271e477e.js https://static.getclicky.com/js?in=%2F4dcb93321b2a3b 200 /4afe62271e477e.js https://static.getclicky.com/js?in=%2F4dcb93321b2a3b 200
/4dcb93321b2a3b https://in.getclicky.com/in.php 200 /4dcb93321b2a3b https://in.getclicky.com/in.php 200

View file

@ -17,26 +17,25 @@ package = "@netlify/plugin-lighthouse"
# HEADERS # HEADERS
### ###
[[headers]] [[headers]]
for = "/feed.xml" for = "/feeds/posts"
[headers.values] [headers.values]
Content-Type = "application/xml; charset=utf-8" Content-Type = "application/xml; charset=utf-8"
x-content-type-options = "nosniff" x-content-type-options = "nosniff"
[[headers]] [[headers]]
for = "/links.xml" for = "/feeds/links"
[headers.values] [headers.values]
Content-Type = "application/xml; charset=utf-8" Content-Type = "application/xml; charset=utf-8"
x-content-type-options = "nosniff" x-content-type-options = "nosniff"
[[headers]] [[headers]]
for = "/books.xml" for = "/feeds/books"
[headers.values] [headers.values]
Content-Type = "application/xml; charset=utf-8" Content-Type = "application/xml; charset=utf-8"
x-content-type-options = "nosniff" x-content-type-options = "nosniff"
[[headers]] [[headers]]
for = "/follow.xml" for = "/feeds/follow"
[headers.values] [headers.values]
Content-Type = "application/xml; charset=utf-8" Content-Type = "application/xml; charset=utf-8"
x-content-type-options = "nosniff" x-content-type-options = "nosniff"

View file

@ -1,10 +1,10 @@
module.exports = async function () { module.exports = async function () {
const { ActivityFeed } = await import('@11ty/eleventy-activity-feed') const { ActivityFeed } = await import('@11ty/eleventy-activity-feed')
const feed = new ActivityFeed() const feed = new ActivityFeed()
feed.addSource('atom', '📝', 'https://coryd.dev/feed.xml') feed.addSource('atom', '📝', 'https://coryd.dev/feeds/posts')
feed.addSource('atom', '🔗', 'https://coryd.dev/links.xml') feed.addSource('atom', '🔗', 'https://coryd.dev/feeds/links')
feed.addSource('rss', '🎥', 'https://letterboxd.com/cdme/rss') feed.addSource('rss', '🎥', 'https://letterboxd.com/cdme/rss')
feed.addSource('atom', '📖', 'https://coryd.dev/books.xml') feed.addSource('atom', '📖', 'https://coryd.dev/feeds/books')
const entries = feed.getEntries().catch() const entries = feed.getEntries().catch()
const res = await entries const res = await entries
const activity = { posts: [] } const activity = { posts: [] }

View file

@ -41,15 +41,15 @@
type="application/atom+xml" type="application/atom+xml"
rel="alternate" rel="alternate"
title="Cory Dransfeldt" title="Cory Dransfeldt"
href="/feed.xml"> href="https://feedpress.me/coryd">
<link <link
rel="alternate" rel="alternate"
type="application/json" type="application/json"
title="Cory Dransfeldt" title="Cory Dransfeldt"
href="/feed.json" /> href="https://feedpress.me/coryd.json" />
<link <link
rel="alternate" rel="alternate"
href="/follow.xml" href="https://feedpress.me/coryd-follow"
title="Cory Dransfeldt's activity feed" title="Cory Dransfeldt's activity feed"
type="application/rss+xml"> type="application/rss+xml">
<script type="application/ld+json"> <script type="application/ld+json">

View file

@ -4,7 +4,7 @@
<title> <title>
{% block title %}All posts • Cory Dransfeldt{% endblock %} {% block title %}All posts • Cory Dransfeldt{% endblock %}
</title> </title>
<link href="{{ site.url }}/feed.xml" rel="self" /> <link href="{{ site.url }}/feeds/posts" rel="self" />
<link href="{{ site.url }}" /> <link href="{{ site.url }}" />
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/" /> <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> <updated>{% block update %}{{ collections.posts[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %}</updated>

View file

@ -24,7 +24,7 @@ class="m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 m
{{ title }} {{ title }}
</h2> </h2>
- Posts ([RSS](/feed.xml) • [JSON](/feed.json)): posts from my site. - Posts ([RSS](https://feedpress.me/coryd) • [JSON](https://feedpress.me/coryd.json)): posts from my site.
- Links ([RSS](/links.xml) • [JSON](/links.json)): links I've liked. - Links ([RSS](https://feedpress.me/coryd-links) • [JSON](https://feedpress.me/coryd-links.json)): links I've liked.
- Books ([RSS](/books.xml) • [JSON](/books.json)): books I'm currently reading. - Books ([RSS](https://feedpress.me/coryd-books.xml) • [JSON](https://feedpress.me/coryd-books.json)): books I'm currently reading.
- Follow ([RSS](/follow.xml) • [JSON](/follow.json)): my activity from around the web. - Follow ([RSS](https://feedpress.me/coryd-follow) • [JSON](https://feedpress.me/coryd-follow.json)): my activity from around the web.

View file

@ -1,6 +1,6 @@
--- ---
layout: null layout: null
permalink: /books.xml permalink: /feeds/books
--- ---
{% layout "./_includes/feeds/books.liquid" %} {% layout "./_includes/feeds/books.liquid" %}
{% block title %}Books • Cory Dransfeldt{% endblock %} {% block title %}Books • Cory Dransfeldt{% endblock %}

View file

@ -1,6 +1,6 @@
--- ---
layout: null layout: null
permalink: /feed.xml permalink: /feeds/posts
--- ---
{% layout "./_includes/feeds/feed.liquid" %} {% layout "./_includes/feeds/feed.liquid" %}
{% block title %}All posts • Cory Dransfeldt{% endblock %} {% block title %}All posts • Cory Dransfeldt{% endblock %}

View file

@ -1,6 +1,6 @@
--- ---
layout: null layout: null
permalink: /follow.xml permalink: /feeds/follow
--- ---
{% layout "./_includes/feeds/follow.liquid" %} {% layout "./_includes/feeds/follow.liquid" %}
{% block title %}Follow • Cory Dransfeldt{% endblock %} {% block title %}Follow • Cory Dransfeldt{% endblock %}

View file

@ -1,20 +0,0 @@
---
permalink: '/books.json'
---
{
"version": "https://jsonfeed.org/version/1",
"title": "Books • Cory Dransfeldt",
"icon": "https://coryd.dev/static/images/avatar.webp",
"home_page_url": "https://coryd.dev",
"feed_url": "https://coryd.dev/books.json",
"items": [{% for book in books %}
{
"id": "{{ book.url | stripUtm | encodeAmp }}",
"title": "{{ book.title | escape }}",
"url": "{{ book.url | stripUtm | encodeAmp }}",
"content_text": "{{ book.description | strip_html }}",
"date_published": "{{ book.dateAdded | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
}

View file

@ -1,21 +0,0 @@
---
permalink: '/feed.json'
---
{% assign posts = collections.posts | reverse %}
{
"version": "https://jsonfeed.org/version/1",
"title": "All posts • Cory Dransfeldt",
"icon": "https://coryd.dev/assets/img/avatar.webp",
"home_page_url": "https://coryd.dev",
"feed_url": "https://coryd.dev/feed.json",
"items": [{% for item in posts %}
{
"id": "{{ site.url }}{{ item.url }}",
"title": "{{ item.data.title }}",
"url": "{{ site.url }}{{ item.url }}",
"content_text": "{{ item.data.title }} {{ site.url }}{{ item.url }}",
"date_published": "{{ item.date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
}

View file

@ -1,21 +0,0 @@
---
permalink: '/follow.json'
---
{% assign posts = follow.posts %}
{
"version": "https://jsonfeed.org/version/1",
"title": "All activity • Cory Dransfeldt",
"icon": "https://coryd.dev/static/images/avatar.webp",
"home_page_url": "https://coryd.dev",
"feed_url": "https://coryd.dev/follow.json",
"items": [{% for item in posts %}
{
"id": "{{ item.id }}",
"title": "{{ item.title }}",
"url": "{{ item.url }}",
"content_text": "{{ item.title }} {{ item.url }}",
"date_published": "{{ item.date_published | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
}

View file

@ -1,20 +0,0 @@
---
permalink: '/links.json'
---
{
"version": "https://jsonfeed.org/version/1",
"title": "Links • Cory Dransfeldt",
"icon": "https://coryd.dev/static/images/avatar.webp",
"home_page_url": "https://coryd.dev",
"feed_url": "https://coryd.dev/links.json",
"items": [{% for link in links %}
{
"id": "{{ link.id }}",
"title": "{{ link.title | escape }}",
"url": "{{ link.url | stripUtm | encodeAmp }}",
"content_text": "{{ link.summary | escape }}",
"date_published": "{{ link.date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
}

View file

@ -1,6 +1,6 @@
--- ---
layout: null layout: null
permalink: /links.xml permalink: /feeds/links
--- ---
{% layout "./_includes/feeds/links.liquid" %} {% layout "./_includes/feeds/links.liquid" %}
{% block title %}Links • Cory Dransfeldt{% endblock %} {% block title %}Links • Cory Dransfeldt{% endblock %}