diff --git a/.changeset/clever-moose-drum.md b/.changeset/clever-moose-drum.md new file mode 100644 index 00000000000..f5ba28bb4a8 --- /dev/null +++ b/.changeset/clever-moose-drum.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Add X social link logo diff --git a/docs/src/content/docs/guides/customization.mdx b/docs/src/content/docs/guides/customization.mdx index 09a136f2907..6c277c24d17 100644 --- a/docs/src/content/docs/guides/customization.mdx +++ b/docs/src/content/docs/guides/customization.mdx @@ -191,7 +191,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 Bitbucket, Codeberg, CodePen, Discord, GitHub, GitLab, Gitter, Instagram, LinkedIn, Mastodon, Microsoft Teams, an RSS feed, Stack Overflow, Telegram, Threads, Twitch, Twitter, and Youtube are supported. +Currently, links to Bitbucket, Codeberg, CodePen, Discord, GitHub, GitLab, Gitter, Instagram, LinkedIn, Mastodon, Microsoft Teams, an RSS feed, Stack Overflow, Telegram, Threads, Twitch, Twitter, X, 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 c0c27691cf6..aeae37cce01 100644 --- a/docs/src/content/docs/reference/configuration.md +++ b/docs/src/content/docs/reference/configuration.md @@ -307,7 +307,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. @@ -323,6 +323,7 @@ starlight({ threads: 'https://www.threads.net/@nmoodev', twitch: 'https://www.twitch.tv/bholmesdev', twitter: 'https://twitter.com/astrodotbuild', + 'x.com': 'https://x.com/astrodotbuild', youtube: 'https://youtube.com/@astrodotbuild', }, }); diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts index 90fb5e1d582..1a600e2b05c 100644 --- a/packages/starlight/components/Icons.ts +++ b/packages/starlight/components/Icons.ts @@ -68,6 +68,8 @@ export const Icons = { '', twitter: '', + 'x.com': + '', mastodon: '', codeberg: diff --git a/packages/starlight/components/SocialIcons.astro b/packages/starlight/components/SocialIcons.astro index a8be569869c..70ca8bd6c14 100644 --- a/packages/starlight/components/SocialIcons.astro +++ b/packages/starlight/components/SocialIcons.astro @@ -21,6 +21,7 @@ const labels: Record = { microsoftTeams: 'Microsoft Teams', instagram: 'Instagram', stackOverflow: 'Stack Overflow', + 'x.com': 'X', telegram: 'Telegram', rss: 'RSS', }; diff --git a/packages/starlight/utils/user-config.ts b/packages/starlight/utils/user-config.ts index 49c70479c43..fb7b72268c6 100644 --- a/packages/starlight/utils/user-config.ts +++ b/packages/starlight/utils/user-config.ts @@ -152,6 +152,7 @@ const UserConfigSchema = z.object({ 'microsoftTeams', 'instagram', 'stackOverflow', + 'x.com', 'telegram', 'rss', ]),