From a8358df7849b342de342a4a2e88e019c39d5bbe8 Mon Sep 17 00:00:00 2001 From: HiDeoo Date: Tue, 3 Oct 2023 00:13:55 +0200 Subject: Add RSS icon (#792) --- .changeset/swift-crews-sneeze.md | 5 +++++ docs/src/content/docs/guides/customization.mdx | 2 +- docs/src/content/docs/reference/configuration.md | 2 +- packages/starlight/components/Icons.ts | 1 + packages/starlight/components/SocialIcons.astro | 1 + packages/starlight/utils/user-config.ts | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/swift-crews-sneeze.md diff --git a/.changeset/swift-crews-sneeze.md b/.changeset/swift-crews-sneeze.md new file mode 100644 index 00000000..ae886a1b --- /dev/null +++ b/.changeset/swift-crews-sneeze.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Add RSS icon diff --git a/docs/src/content/docs/guides/customization.mdx b/docs/src/content/docs/guides/customization.mdx index e605372c..dfac352d 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, Stack Overflow, 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, 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 19c877db..0042e0cb 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. diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts index 68f1632f..a926ce96 100644 --- a/packages/starlight/components/Icons.ts +++ b/packages/starlight/components/Icons.ts @@ -86,4 +86,5 @@ export const Icons = { '', stackOverflow: '', + rss: '', }; diff --git a/packages/starlight/components/SocialIcons.astro b/packages/starlight/components/SocialIcons.astro index 2a42e71f..c9cb2b9e 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', + rss: 'RSS', }; 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 dcc69ee4..e4f7ad3f 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', + 'rss', ]), // Link to the respective social profile for this site z.string().url() -- cgit