From cb8bcec533c9a7849eda01a4a4157b4726c9902c Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 1 Aug 2023 13:05:34 +0200 Subject: Add icons for Bitbucket, Gitter, CodePen, and Microsoft Teams (#443) --- .changeset/nervous-plants-relate.md | 5 +++++ docs/src/content/docs/guides/customization.mdx | 2 +- docs/src/content/docs/reference/configuration.md | 2 +- packages/starlight/components/Icons.ts | 8 ++++++++ packages/starlight/components/SocialIcons.astro | 4 ++++ packages/starlight/utils/user-config.ts | 4 ++++ 6 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .changeset/nervous-plants-relate.md diff --git a/.changeset/nervous-plants-relate.md b/.changeset/nervous-plants-relate.md new file mode 100644 index 00000000..9879161a --- /dev/null +++ b/.changeset/nervous-plants-relate.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Add icons for Bitbucket, Gitter, CodePen, and Microsoft Teams diff --git a/docs/src/content/docs/guides/customization.mdx b/docs/src/content/docs/guides/customization.mdx index 99b1d9b9..d337b260 100644 --- a/docs/src/content/docs/guides/customization.mdx +++ b/docs/src/content/docs/guides/customization.mdx @@ -178,7 +178,7 @@ defineConfig({ Starlight has built-in support for adding links to your social media accounts to the site header via the [`social`](/reference/configuration/#social) option in the Starlight integration. -Currently, links to Codeberg, Discord, GitHub, LinkedIn, Mastodon, Threads, Twitch, Twitter, and Youtube are supported. +Currently, links to Bitbucket, Codeberg, CodePen, Discord, GitHub, GitLab, Gitter, LinkedIn, Mastodon, Microsoft Teams, Threads, Twitch, Twitter, and Youtube are supported. Let us know on GitHub or Discord if you need support for another service! ```js diff --git a/docs/src/content/docs/reference/configuration.md b/docs/src/content/docs/reference/configuration.md index a142f01c..c0d77d7f 100644 --- a/docs/src/content/docs/reference/configuration.md +++ b/docs/src/content/docs/reference/configuration.md @@ -295,7 +295,7 @@ The default locale will be used to provide fallback content where translations a ### `social` -**type:** `Partial>` +**type:** `Partial>` Optional details about the social media accounts for this site. Adding any of these will display them as icon links in the site header. diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts index 4192879b..7cf21b4b 100644 --- a/packages/starlight/components/Icons.ts +++ b/packages/starlight/components/Icons.ts @@ -56,8 +56,14 @@ export const Icons = { '', gitlab: '', + bitbucket: + '', + codePen: + '', discord: '', + gitter: + '', twitter: '', mastodon: @@ -72,4 +78,6 @@ export const Icons = { '', twitch: '', + microsoftTeams: + '', }; diff --git a/packages/starlight/components/SocialIcons.astro b/packages/starlight/components/SocialIcons.astro index 3400ba07..14b9876a 100644 --- a/packages/starlight/components/SocialIcons.astro +++ b/packages/starlight/components/SocialIcons.astro @@ -7,14 +7,18 @@ type Platform = keyof NonNullable; const labels: Record = { github: 'GitHub', gitlab: 'GitLab', + bitbucket: 'Bitbucket', discord: 'Discord', + gitter: 'Gitter', twitter: 'Twitter', mastodon: 'Mastodon', codeberg: 'Codeberg', + codePen: 'CodePen', youtube: 'YouTube', threads: 'Threads', linkedin: 'LinkedIn', twitch: 'Twitch', + microsoftTeams: 'Microsoft Teams', }; const links = Object.entries(config.social || {}).filter(([, url]) => Boolean(url)) as [ diff --git a/packages/starlight/utils/user-config.ts b/packages/starlight/utils/user-config.ts index 0762a6fa..16a0827d 100644 --- a/packages/starlight/utils/user-config.ts +++ b/packages/starlight/utils/user-config.ts @@ -137,12 +137,16 @@ const UserConfigSchema = z.object({ 'mastodon', 'github', 'gitlab', + 'bitbucket', 'discord', + 'gitter', 'codeberg', + 'codePen', 'youtube', 'threads', 'linkedin', 'twitch', + 'microsoftTeams', ]), // Link to the respective social profile for this site z.string().url() -- cgit