summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD3vil0p3r2023-08-14 16:27:59 -0400
committerGitHub2023-08-14 22:27:59 +0200
commitfcff49ee4260ad68e80833712e161cbb978a2562 (patch)
tree0ec3e97ab0c9fe4c2d9bbbc85f488177115a338c
parent265b9bd8abec591abb2cd2df41613534558a6e77 (diff)
downloadIT.starlight-fcff49ee4260ad68e80833712e161cbb978a2562.tar.gz
IT.starlight-fcff49ee4260ad68e80833712e161cbb978a2562.tar.bz2
IT.starlight-fcff49ee4260ad68e80833712e161cbb978a2562.zip
Add Instagram icon (#499)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r--.changeset/nervous-plants-relate.md5
-rw-r--r--docs/src/content/docs/guides/customization.mdx2
-rw-r--r--docs/src/content/docs/reference/configuration.md2
-rw-r--r--packages/starlight/components/Icons.ts2
-rw-r--r--packages/starlight/components/SocialIcons.astro1
-rw-r--r--packages/starlight/utils/user-config.ts1
6 files changed, 11 insertions, 2 deletions
diff --git a/.changeset/nervous-plants-relate.md b/.changeset/nervous-plants-relate.md
new file mode 100644
index 00000000..1878d843
--- /dev/null
+++ b/.changeset/nervous-plants-relate.md
@@ -0,0 +1,5 @@
+---
+"@astrojs/starlight": patch
+---
+
+Add icons for Instagram
diff --git a/docs/src/content/docs/guides/customization.mdx b/docs/src/content/docs/guides/customization.mdx
index 733ff6ce..8bbd5250 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 Bitbucket, Codeberg, CodePen, Discord, GitHub, GitLab, Gitter, LinkedIn, Mastodon, Microsoft Teams, Threads, Twitch, Twitter, and Youtube are supported.
+Currently, links to Bitbucket, Codeberg, CodePen, Discord, GitHub, GitLab, Gitter, Instagram, 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 593f4593..8f3a15da 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<Record<'bitbucket' | 'codeberg' | 'codePen' | 'discord' | 'github' | 'gitlab' | 'gitter' | 'linkedin' | 'mastodon' | 'microsoftTeams' | 'threads' | 'twitch' | 'twitter' | 'youtube', string>>`
+**type:** `Partial<Record<'bitbucket' | 'codeberg' | 'codePen' | 'discord' | 'github' | 'gitlab' | 'gitter' | 'instagram' | 'linkedin' | 'mastodon' | 'microsoftTeams' | '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 92d5cc61..262d5f01 100644
--- a/packages/starlight/components/Icons.ts
+++ b/packages/starlight/components/Icons.ts
@@ -82,4 +82,6 @@ export const Icons = {
'<path d="M2.5 1 1 4.8v15.4h5.5V23h3.1l3-2.8H17l6-5.7V1H2.6ZM21 13.5l-3.4 3.3H12l-3 2.8v-2.8H4.5V3H21v10.5Zm-3.4-6.8v5.8h-2V6.7h2Zm-5.5 0v5.8h-2V6.7h2Z"/>',
microsoftTeams:
'<path d="M13.78 7.2a3.63 3.63 0 1 0-4.3-3.68h1.78a2.52 2.52 0 0 1 2.52 2.53V7.2zM7.34 18.8h3.92a2.52 2.52 0 0 0 2.52-2.52V8.37h4.17c.58.01 1.04.5 1.03 1.07v6.45a6.3 6.3 0 0 1-6.14 6.43 6.3 6.3 0 0 1-5.5-3.52zm16.1-14.06a2.51 2.51 0 1 1-5.02 0 2.51 2.51 0 0 1 5.02 0zm-3.36 14.24h-.17c.4-1 .59-2.05.57-3.11V9.46c0-.38-.07-.75-.23-1.09h2.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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"/>',
};
diff --git a/packages/starlight/components/SocialIcons.astro b/packages/starlight/components/SocialIcons.astro
index 14b9876a..340916bd 100644
--- a/packages/starlight/components/SocialIcons.astro
+++ b/packages/starlight/components/SocialIcons.astro
@@ -19,6 +19,7 @@ const labels: Record<Platform, string> = {
linkedin: 'LinkedIn',
twitch: 'Twitch',
microsoftTeams: 'Microsoft Teams',
+ instagram: 'Instagram',
};
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 16a0827d..e91e0cdc 100644
--- a/packages/starlight/utils/user-config.ts
+++ b/packages/starlight/utils/user-config.ts
@@ -147,6 +147,7 @@ const UserConfigSchema = z.object({
'linkedin',
'twitch',
'microsoftTeams',
+ 'instagram',
]),
// Link to the respective social profile for this site
z.string().url()