From 49aef173811d05ae132729c92c3920a142ceeb7d Mon Sep 17 00:00:00 2001 From: Jose Luis de Vega Andres Date: Tue, 19 Nov 2024 11:03:01 +0100 Subject: feat: add Backstage social icon (#2600) Co-authored-by: Chris Swithinbank --- .changeset/soft-snails-chew.md | 5 +++++ packages/starlight/__tests__/basics/config-errors.test.ts | 2 +- packages/starlight/components/Icons.ts | 1 + packages/starlight/schemas/social.ts | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/soft-snails-chew.md diff --git a/.changeset/soft-snails-chew.md b/.changeset/soft-snails-chew.md new file mode 100644 index 00000000..bd3219f0 --- /dev/null +++ b/.changeset/soft-snails-chew.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Adds Backstage social icon diff --git a/packages/starlight/__tests__/basics/config-errors.test.ts b/packages/starlight/__tests__/basics/config-errors.test.ts index bcbe08f1..6a453895 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' | 'nostr', 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' | 'backstage', received 'unknown' **social.unknown**: Invalid url" ` ); diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts index 96ea4e43..2fed6c22 100644 --- a/packages/starlight/components/Icons.ts +++ b/packages/starlight/components/Icons.ts @@ -160,6 +160,7 @@ export const BuiltInIcons = { jsr: '', nostr: '', + backstage: '' }; export const Icons = { diff --git a/packages/starlight/schemas/social.ts b/packages/starlight/schemas/social.ts index c1ecdf9f..05d5f9da 100644 --- a/packages/starlight/schemas/social.ts +++ b/packages/starlight/schemas/social.ts @@ -36,6 +36,7 @@ export const socialLinks = [ 'pinterest', 'tiktok', 'nostr', + 'backstage' ] as const; export const SocialLinksSchema = () => @@ -87,6 +88,7 @@ export const SocialLinksSchema = () => pinterest: 'Pinterest', tiktok: 'TikTok', nostr: 'Nostr', + backstage: 'Backstage' }[key]; labelledLinks[key] = { label, url }; } -- cgit