diff options
author | HiDeoo | 2023-10-03 00:13:55 +0200 |
---|---|---|
committer | GitHub | 2023-10-03 00:13:55 +0200 |
commit | a8358df7849b342de342a4a2e88e019c39d5bbe8 (patch) | |
tree | 2ded17edd90a3ae40af5d64d504d9acab29cafa7 | |
parent | 54301c3d21032207205f928eaef0bf5862d5518f (diff) | |
download | IT.starlight-a8358df7849b342de342a4a2e88e019c39d5bbe8.tar.gz IT.starlight-a8358df7849b342de342a4a2e88e019c39d5bbe8.tar.bz2 IT.starlight-a8358df7849b342de342a4a2e88e019c39d5bbe8.zip |
Add RSS icon (#792)
-rw-r--r-- | .changeset/swift-crews-sneeze.md | 5 | ||||
-rw-r--r-- | docs/src/content/docs/guides/customization.mdx | 2 | ||||
-rw-r--r-- | docs/src/content/docs/reference/configuration.md | 2 | ||||
-rw-r--r-- | packages/starlight/components/Icons.ts | 1 | ||||
-rw-r--r-- | packages/starlight/components/SocialIcons.astro | 1 | ||||
-rw-r--r-- | packages/starlight/utils/user-config.ts | 1 |
6 files changed, 10 insertions, 2 deletions
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<Record<'bitbucket' | 'codeberg' | 'codePen' | 'discord' | 'github' | 'gitlab' | 'gitter' | 'instagram' | 'linkedin' | 'mastodon' | 'microsoftTeams' | 'stackOverflow' | 'threads' | 'twitch' | 'twitter' | 'youtube', string>>` +**type:** `Partial<Record<'bitbucket' | 'codeberg' | 'codePen' | 'discord' | 'github' | 'gitlab' | 'gitter' | 'instagram' | 'linkedin' | 'mastodon' | 'microsoftTeams' | 'rss' | 'stackOverflow' | 'threads' | 'twitch' | 'twitter' | 'youtube', string>>` 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 = { '<path d="M17.3 5.5a1.2 1.2 0 1 0 1.2 1.2 1.2 1.2 0 0 0-1.2-1.2ZM22 7.9a7.6 7.6 0 0 0-.4-2.5 5 5 0 0 0-1.2-1.7 4.7 4.7 0 0 0-1.8-1.2 7.3 7.3 0 0 0-2.4-.4L12 2H7.9a7.3 7.3 0 0 0-2.5.5 4.8 4.8 0 0 0-1.7 1.2 4.7 4.7 0 0 0-1.2 1.8 7.3 7.3 0 0 0-.4 2.4L2 12v4.1a7.3 7.3 0 0 0 .5 2.4 4.7 4.7 0 0 0 1.2 1.8 4.8 4.8 0 0 0 1.8 1.2 7.3 7.3 0 0 0 2.4.4l4.1.1h4.1a7.3 7.3 0 0 0 2.4-.5 4.7 4.7 0 0 0 1.8-1.2 4.8 4.8 0 0 0 1.2-1.7 7.6 7.6 0 0 0 .4-2.5L22 12V7.9ZM20.1 16a5.6 5.6 0 0 1-.3 1.9A3 3 0 0 1 19 19a3.2 3.2 0 0 1-1.1.8 5.6 5.6 0 0 1-1.9.3H8a5.7 5.7 0 0 1-1.9-.3A3.3 3.3 0 0 1 5 19a3 3 0 0 1-.7-1.1 5.5 5.5 0 0 1-.4-1.9l-.1-4V8a5.5 5.5 0 0 1 .4-1.9A3 3 0 0 1 5 5a3.1 3.1 0 0 1 1.1-.8A5.7 5.7 0 0 1 8 3.9l4-.1h4a5.6 5.6 0 0 1 1.9.4A3 3 0 0 1 19 5a3 3 0 0 1 .7 1.1A5.6 5.6 0 0 1 20 8l.1 4v4ZM12 6.9a5.1 5.1 0 1 0 5.1 5.1A5.1 5.1 0 0 0 12 6.9Zm0 8.4a3.3 3.3 0 1 1 3.3-3.3 3.3 3.3 0 0 1-3.3 3.3Z"/>', stackOverflow: '<path d="M15.72 0 14 1.28l6.4 8.58 1.7-1.26L15.73 0zm-3.94 3.42-1.36 1.64 8.22 6.85 1.37-1.64-8.23-6.85zM8.64 7.88l-.91 1.94 9.7 4.52.9-1.94-9.7-4.52zm-1.86 4.86-.44 2.1 10.48 2.2.44-2.1-10.47-2.2zM1.9 15.47V24h19.19v-8.53h-2.13v6.4H4.02v-6.4H1.9zm4.26 2.13v2.13h10.66V17.6H6.15Z"/>', + rss: '<path d="M2.88,16.88a3,3,0,0,0,0,4.24,3,3,0,0,0,4.24,0,3,3,0,0,0-4.24-4.24Zm2.83,2.83a1,1,0,0,1-1.42-1.42,1,1,0,0,1,1.42,0A1,1,0,0,1,5.71,19.71ZM5,12a1,1,0,0,0,0,2,5,5,0,0,1,5,5,1,1,0,0,0,2,0,7,7,0,0,0-7-7ZM5,8a1,1,0,0,0,0,2,9,9,0,0,1,9,9,1,1,0,0,0,2,0,11.08,11.08,0,0,0-3.22-7.78A11.08,11.08,0,0,0,5,8Zm10.61.39A15.11,15.11,0,0,0,5,4,1,1,0,0,0,5,6,13,13,0,0,1,18,19a1,1,0,0,0,2,0A15.11,15.11,0,0,0,15.61,8.39Z"/>', }; 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<Platform, string> = { 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() |