Skip to content

Commit

Permalink
feat: add Backstage social icon (#2600)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <[email protected]>
  • Loading branch information
jdevega and delucis authored Nov 19, 2024
1 parent ec7ab4f commit 49aef17
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/soft-snails-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Adds Backstage social icon
2 changes: 1 addition & 1 deletion packages/starlight/__tests__/basics/config-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
`
);
Expand Down
1 change: 1 addition & 0 deletions packages/starlight/components/Icons.ts
Original file line number Diff line number Diff line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Icons = {
Expand Down
2 changes: 2 additions & 0 deletions packages/starlight/schemas/social.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const socialLinks = [
'pinterest',
'tiktok',
'nostr',
'backstage'
] as const;

export const SocialLinksSchema = () =>
Expand Down Expand Up @@ -87,6 +88,7 @@ export const SocialLinksSchema = () =>
pinterest: 'Pinterest',
tiktok: 'TikTok',
nostr: 'Nostr',
backstage: 'Backstage'
}[key];
labelledLinks[key] = { label, url };
}
Expand Down

0 comments on commit 49aef17

Please sign in to comment.