From b8b7dc8da40ab36631ec7f2dfa18a5f5fcd61ad0 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 3 Jun 2023 17:17:31 -0700 Subject: [PATCH] chore: pinboard -> instapaper --- src/_data/articles.js | 15 ----- src/_data/follow.js | 1 - src/_data/site.json | 2 +- src/_includes/feed-links.liquid | 18 ------ src/_includes/footer.liquid | 2 +- src/_includes/icons/instapaper.liquid | 13 +++++ src/_includes/icons/pinboard.liquid | 13 ----- src/_includes/now.liquid | 16 ------ src/assets/atom-feed-links.xsl | 80 --------------------------- src/feeds.md | 1 - src/feeds/links.liquid | 20 ------- src/follow-feed.11ty.js | 1 - src/links.11ty.liquid | 21 ------- src/uses.md | 3 +- vercel.json | 13 ----- 15 files changed, 16 insertions(+), 203 deletions(-) delete mode 100644 src/_data/articles.js delete mode 100644 src/_includes/feed-links.liquid create mode 100644 src/_includes/icons/instapaper.liquid delete mode 100644 src/_includes/icons/pinboard.liquid delete mode 100644 src/assets/atom-feed-links.xsl delete mode 100644 src/feeds/links.liquid delete mode 100644 src/links.11ty.liquid diff --git a/src/_data/articles.js b/src/_data/articles.js deleted file mode 100644 index 29d59061..00000000 --- a/src/_data/articles.js +++ /dev/null @@ -1,15 +0,0 @@ -const EleventyFetch = require('@11ty/eleventy-fetch') - -module.exports = async function () { - const PINBOARD_KEY = process.env.API_KEY_PINBOARD - const url = `https://api.pinboard.in/v1/posts/recent?auth_token=${PINBOARD_KEY}&count=100&format=json` - const res = EleventyFetch(url, { - duration: '1h', - type: 'json', - }).catch() - const feed = await res - const filtered = feed.posts.filter((item) => { - return item.shared === 'yes' && item.tags.includes('share') - }) - return filtered.splice(0, 5) -} diff --git a/src/_data/follow.js b/src/_data/follow.js index d58e5dd7..009a88ee 100644 --- a/src/_data/follow.js +++ b/src/_data/follow.js @@ -2,7 +2,6 @@ module.exports = async function () { const { ActivityFeed } = await import('@11ty/eleventy-activity-feed') const feed = new ActivityFeed() feed.addSource('atom', '📝', 'https://coryd.dev/feed.xml') - feed.addSource('atom', '🔗', 'https://coryd.dev/links.xml') feed.addSource('rss', '🎥', 'https://letterboxd.com/cdme/rss') feed.addSource('rss', '📖', 'https://oku.club/rss/collection/NvEmF') const entries = feed.getEntries().catch() diff --git a/src/_data/site.json b/src/_data/site.json index 48078158..0de58a56 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -10,7 +10,7 @@ "mastodon": "https://social.lol/@cory", "lastfm": "https://last.fm/user/cdme_", "listenbrainz": "https://listenbrainz.org/user/cdransf/", - "pinboard": "https://pinboard.in/u:cdme/profile/public/", + "instapaper": "https://www.instapaper.com/p/coryd", "letterboxd": "https://letterboxd.com/cdme", "letterboxd-host": "https://a.ltrbxd.com", "trakt": "https://trakt.tv/users/cdransf", diff --git a/src/_includes/feed-links.liquid b/src/_includes/feed-links.liquid deleted file mode 100644 index c20f6466..00000000 --- a/src/_includes/feed-links.liquid +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {% block title %}Links • Cory Dransfeldt{% endblock %} - - - - - {% block update %}{{ articles[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} - {{ site.url }} - - {{ site.name }} - {{ site.email }} - - {{ eleventy.generator }} - {% block entries %}{% endblock %} - diff --git a/src/_includes/footer.liquid b/src/_includes/footer.liquid index fc6a19a0..1aeb5ff6 100644 --- a/src/_includes/footer.liquid +++ b/src/_includes/footer.liquid @@ -5,7 +5,7 @@ {% include "icons/mastodon.liquid" %} {% include "icons/lastfm.liquid" %} {% include "icons/musicbrainz.liquid" %} - {% include "icons/pinboard.liquid" %} + {% include "icons/instapaper.liquid" %} {% include "icons/letterboxd.liquid" %} {% include "icons/trakt.liquid" %} {% include "icons/oku.liquid" %} diff --git a/src/_includes/icons/instapaper.liquid b/src/_includes/icons/instapaper.liquid new file mode 100644 index 00000000..b54acc0f --- /dev/null +++ b/src/_includes/icons/instapaper.liquid @@ -0,0 +1,13 @@ +{% if site.instapaper != "" %} + + + + Instapaper + +{% endif %} diff --git a/src/_includes/icons/pinboard.liquid b/src/_includes/icons/pinboard.liquid deleted file mode 100644 index 960081f0..00000000 --- a/src/_includes/icons/pinboard.liquid +++ /dev/null @@ -1,13 +0,0 @@ -{% if site.pinboard != "" %} - - Pinboard - - Pinboard - -{% endif %} diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 6e232f2e..79ce7f1b 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -105,22 +105,6 @@ layout: main {% endif %} - {% if articles.size > 0 %} -

- Reading: articles -

-
- -
- {% endif %} {% if movies.size > 0 %}

Watching: movies diff --git a/src/assets/atom-feed-links.xsl b/src/assets/atom-feed-links.xsl deleted file mode 100644 index b2fef82d..00000000 --- a/src/assets/atom-feed-links.xsl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - <xsl:value-of select="atom:feed/atom:title"/> - - - - - - - - - - -
-
- -
-
-

- - - - Feed preview • links -

-

Recently read and favorited links sourced from the Pinboard API.

-

-
-
    - -
-
-
-
-

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. -
-
-
- - -
- -
  • - - - - - - -
  • -
    -
    diff --git a/src/feeds.md b/src/feeds.md index 8d8e3e1c..b78deed5 100644 --- a/src/feeds.md +++ b/src/feeds.md @@ -25,5 +25,4 @@ class="m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 m

    - Posts ([RSS](/feed.xml) • [JSON](/feed.json)): a feed of all of my blog posts. -- Links ([RSS](/links.xml) • [JSON](/links.json)): a feed of links I've shared via the Pinboard API. - Follow ([JSON](/follow.json)): a JSON feed of my web activity comprised of blog posts, links, movies and books (using the same data sources as [my now page](/now)). diff --git a/src/feeds/links.liquid b/src/feeds/links.liquid deleted file mode 100644 index a909fdfb..00000000 --- a/src/feeds/links.liquid +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: null -permalink: /links.xml ---- -{% layout "./_includes/feed-links.liquid" %} -{% block title %}Links • Cory Dransfeldt{% endblock %} -{% block self %}links.xml{% endblock %} -{% block update %}{{ articles[0].time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} -{% block entries %} - {% assign links = articles | reverse %} - {% for link in links %} - - {{ link.description | escape }} - - {{ link.time | date: "%m.%d.%Y" }} - {{ link.href }} - - - {% endfor %} -{% endblock %} diff --git a/src/follow-feed.11ty.js b/src/follow-feed.11ty.js index 23918aea..d484f9ce 100644 --- a/src/follow-feed.11ty.js +++ b/src/follow-feed.11ty.js @@ -10,7 +10,6 @@ module.exports = class { const feed = new ActivityFeed() feed.addSource('atom', '📝', 'https://coryd.dev/feed.xml') - feed.addSource('atom', '🔗', 'https://coryd.dev/links.xml') feed.addSource('rss', '🎥', 'https://letterboxd.com/cdme/rss') feed.addSource('rss', '📖', 'https://oku.club/rss/collection/NvEmF') diff --git a/src/links.11ty.liquid b/src/links.11ty.liquid deleted file mode 100644 index 855df35c..00000000 --- a/src/links.11ty.liquid +++ /dev/null @@ -1,21 +0,0 @@ ---- -permalink: '/links.json' ---- -{% assign links = articles | reverse %} -{ -"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.href }}", - "title": "{{ link.description | escape }}", - "url": "{{ link.href }}", - "content_text": "", - "date_published": "{{ link.time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}" - }{% if not forloop.last %},{% endif %} -{% endfor %} -] -} diff --git a/src/uses.md b/src/uses.md index 476daabb..7aeb5aff 100644 --- a/src/uses.md +++ b/src/uses.md @@ -39,7 +39,6 @@ Software and services that I use for work and my own enjoyment. - [Obsidian](https://obsidian.md) - [Readkit](https://readkit.app) -- [Pins for Pinboard](https://get-pins.app) - [Plexamp](https://plexamp.com) - [Ivory](https://tapbots.com/ivory) - [Parcel](https://parcelapp.net) @@ -76,7 +75,7 @@ Software and services that I use for work and my own enjoyment. - Bunny.net - [1Password](https://1password.com) - [Feedbin](https://feedbin.com) -- [Pinboard](https://pinboard.in) +- [Instapaper](https://instapaper.com) - [Trakt](https://trakt.tv) - [Letterboxd](https://letterboxd.com) - [Oku](https://oku.club) diff --git a/vercel.json b/vercel.json index abdaa9ce..3e89079a 100644 --- a/vercel.json +++ b/vercel.json @@ -16,19 +16,6 @@ } ] }, - { - "source": "/links.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": [