From 75ad22fb70bb2f51ebf21b1df2f0201700b0977a Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Mon, 5 Jun 2023 14:34:29 -0700 Subject: [PATCH] chore: add rss for follow feed --- src/_includes/feed-follow.liquid | 18 ++++++++ src/assets/atom-feed-follow.xsl | 73 ++++++++++++++++++++++++++++++++ src/assets/atom-feed-links.xsl | 7 --- src/assets/atom-feed.xsl | 7 --- src/feeds/follow.liquid | 20 +++++++++ vercel.json | 13 ++++++ 6 files changed, 124 insertions(+), 14 deletions(-) create mode 100644 src/_includes/feed-follow.liquid create mode 100644 src/assets/atom-feed-follow.xsl create mode 100644 src/feeds/follow.liquid diff --git a/src/_includes/feed-follow.liquid b/src/_includes/feed-follow.liquid new file mode 100644 index 00000000..4b07ca47 --- /dev/null +++ b/src/_includes/feed-follow.liquid @@ -0,0 +1,18 @@ + + + + + {% block title %}Follow • Cory Dransfeldt{% endblock %} + + + + + {% block update %}{{ links[0].time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} + {{ site.url }} + + {{ site.name }} + {{ site.email }} + + {{ eleventy.generator }} + {% block entries %}{% endblock %} + \ No newline at end of file diff --git a/src/assets/atom-feed-follow.xsl b/src/assets/atom-feed-follow.xsl new file mode 100644 index 00000000..41054977 --- /dev/null +++ b/src/assets/atom-feed-follow.xsl @@ -0,0 +1,73 @@ + + + + + + + + + <xsl:value-of select="atom:feed/atom:title"/> + + + + + + + + + + +
+
+ +
+
+

+ + + + Feed preview • follow +

+

My activity from around the web.

+

+
+
    + +
+
+
+
+

This is a web feed, also known as an RSS or Atom feed.

+

Subscribe by copying the URL from the address bar into your newsreader.

+
+ Visit About Feeds to get started with newsreaders and subscribing. It's free. +
+
+
+ + +
+ +
  • + + + + + + +
  • +
    +
    \ No newline at end of file diff --git a/src/assets/atom-feed-links.xsl b/src/assets/atom-feed-links.xsl index 0a8f2255..bd9199c7 100644 --- a/src/assets/atom-feed-links.xsl +++ b/src/assets/atom-feed-links.xsl @@ -1,11 +1,4 @@ - - + {{ item.title | escape }} + + {{ item.date_published | date: "%m.%d.%Y" }} + {{ item.url }} + + +{% endfor %} +{% endblock %} \ No newline at end of file diff --git a/vercel.json b/vercel.json index abdaa9ce..570a6026 100644 --- a/vercel.json +++ b/vercel.json @@ -29,6 +29,19 @@ } ] }, + { + "source": "/follow.xml", + "headers": [ + { + "key": "Content-Type", + "value": "application/xml; charset=utf-8 # not application/rss+xml" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ] + }, { "source": "/.well-known/webfinger", "headers": [