From 241966bd0523a2e82891d622b2a97b2f3646bc41 Mon Sep 17 00:00:00 2001 From: Rafid Muhymin Wafi Date: Fri, 8 Nov 2024 18:11:12 +0600 Subject: Added social icon for Nostr (#2579) Co-authored-by: Chris Swithinbank --- .changeset/calm-worms-count.md | 5 +++++ packages/starlight/__tests__/basics/config-errors.test.ts | 2 +- packages/starlight/components/Icons.ts | 2 ++ packages/starlight/schemas/social.ts | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/calm-worms-count.md diff --git a/.changeset/calm-worms-count.md b/.changeset/calm-worms-count.md new file mode 100644 index 00000000..749c3be7 --- /dev/null +++ b/.changeset/calm-worms-count.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Adds social link icon for Nostr diff --git a/packages/starlight/__tests__/basics/config-errors.test.ts b/packages/starlight/__tests__/basics/config-errors.test.ts index 07424eb9..bcbe08f1 100644 --- a/packages/starlight/__tests__/basics/config-errors.test.ts +++ b/packages/starlight/__tests__/basics/config-errors.test.ts @@ -114,7 +114,7 @@ test('errors with bad social icon config', () => { "[AstroUserError]: Invalid config passed to starlight integration Hint: - **social.unknown**: Invalid enum value. Expected 'twitter' | 'mastodon' | 'github' | 'gitlab' | 'bitbucket' | 'discord' | 'gitter' | 'codeberg' | 'codePen' | 'youtube' | 'threads' | 'linkedin' | 'twitch' | 'azureDevOps' | 'microsoftTeams' | 'instagram' | 'stackOverflow' | 'x.com' | 'telegram' | 'rss' | 'facebook' | 'email' | 'reddit' | 'patreon' | 'signal' | 'slack' | 'matrix' | 'openCollective' | 'hackerOne' | 'blueSky' | 'discourse' | 'zulip' | 'pinterest' | 'tiktok', received 'unknown' + **social.unknown**: Invalid enum value. Expected 'twitter' | 'mastodon' | 'github' | 'gitlab' | 'bitbucket' | 'discord' | 'gitter' | 'codeberg' | 'codePen' | 'youtube' | 'threads' | 'linkedin' | 'twitch' | 'azureDevOps' | 'microsoftTeams' | 'instagram' | 'stackOverflow' | 'x.com' | 'telegram' | 'rss' | 'facebook' | 'email' | 'reddit' | 'patreon' | 'signal' | 'slack' | 'matrix' | 'openCollective' | 'hackerOne' | 'blueSky' | 'discourse' | 'zulip' | 'pinterest' | 'tiktok' | 'nostr', received 'unknown' **social.unknown**: Invalid url" ` ); diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts index 41f7284b..96ea4e43 100644 --- a/packages/starlight/components/Icons.ts +++ b/packages/starlight/components/Icons.ts @@ -158,6 +158,8 @@ export const BuiltInIcons = { '', deno: '', jsr: '', + nostr: + '', }; export const Icons = { diff --git a/packages/starlight/schemas/social.ts b/packages/starlight/schemas/social.ts index c6e92548..c1ecdf9f 100644 --- a/packages/starlight/schemas/social.ts +++ b/packages/starlight/schemas/social.ts @@ -35,6 +35,7 @@ export const socialLinks = [ 'zulip', 'pinterest', 'tiktok', + 'nostr', ] as const; export const SocialLinksSchema = () => @@ -85,6 +86,7 @@ export const SocialLinksSchema = () => zulip: 'Zulip', pinterest: 'Pinterest', tiktok: 'TikTok', + nostr: 'Nostr', }[key]; labelledLinks[key] = { label, url }; } -- cgit