From 1ed72d23ff0c1849e8621cf50dc0923cd392f1fa Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Mar 2024 14:00:32 -0300 Subject: external-links: Cohost --- src/static/icons.svg | 1 + src/strings-default.yaml | 1 + src/util/external-links.js | 9 +++++++++ tap-snapshots/test/snapshot/linkExternal.js.test.cjs | 2 ++ test/snapshot/linkExternal.js | 3 +++ 5 files changed, 16 insertions(+) diff --git a/src/static/icons.svg b/src/static/icons.svg index a180db72..fa832bad 100644 --- a/src/static/icons.svg +++ b/src/static/icons.svg @@ -11,6 +11,7 @@ + diff --git a/src/strings-default.yaml b/src/strings-default.yaml index 27af2797..5df10500 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -514,6 +514,7 @@ misc: bluesky: "Bluesky" carrd: "Carrd" + cohost: "Cohost" deconreconstruction: _: "Deconreconstruction" diff --git a/src/util/external-links.js b/src/util/external-links.js index d1ca448b..890373fc 100644 --- a/src/util/external-links.js +++ b/src/util/external-links.js @@ -271,6 +271,15 @@ export const externalLinkSpec = [ icon: 'carrd', }, + { + match: {domain: 'cohost.org'}, + + platform: 'cohost', + handle: {pathname: /^([^/]+)\/?$/}, + + icon: 'cohost', + }, + { match: {domain: 'music.deconreconstruction.com'}, platform: 'deconreconstruction.music', diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs index 55031c66..10c8e88e 100644 --- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs @@ -80,6 +80,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context jacobtheloofah aliceflare bigchaslappa +cosmoptera MUSIC@DCRC MUSIC@DCRC Deconreconstruction @@ -154,6 +155,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context Bluesky Carrd Carrd +Cohost MUSIC@DCRC MUSIC@DCRC Deconreconstruction diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js index 18f32907..43ffe953 100644 --- a/test/snapshot/linkExternal.js +++ b/test/snapshot/linkExternal.js @@ -60,6 +60,9 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { 'https://aliceflare.carrd.co', 'https://bigchaslappa.carrd.co/', + // platform: cohost + 'https://cohost.org/cosmoptera', + // platform: deconreconstruction.music 'https://music.deconreconstruction.com/albums/catch-322', 'https://music.deconreconstruction.com/albums/catch-322?track=arcjecs-theme', -- cgit 1.3.0-6-gf8a5