From 5a7beeae3f5be2368f9cdaef18a6f5965698db02 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 4 Jul 2024 13:37:33 -0700 Subject: [PATCH] chore: masto username filter --- config/filters/index.js | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/filters/index.js b/config/filters/index.js index f9e96dd7..9d47a7ac 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -78,6 +78,12 @@ export default { // links absoluteUrl: (url) => (new URL(url, BASE_URL)).toString(), + // mastodon + mastoUsername: (url) => { + const url = new URL(post.author.mastodon) + return `${url.pathname.replace('/', '')}@${url.host}` + }, + // feeds normalizeEntries: (entries) => { const posts = [] diff --git a/package-lock.json b/package-lock.json index f8f71f57..a14f83d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "19.9.17", + "version": "19.9.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "19.9.17", + "version": "19.9.18", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.4.0", diff --git a/package.json b/package.json index 653a1d38..04fdea5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "19.9.17", + "version": "19.9.18", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": {