summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Sullivan2024-08-13 05:26:27 -0400
committerGitHub2024-08-13 11:26:27 +0200
commit91557fd73a43ab596f0fefb7c9aa0218b9a0b208 (patch)
tree75ac120a2edb4ab5c4f230a6e89596f9c9fdb919
parent07c141f11788bcfe18b28c573a6cfbf35d9daa78 (diff)
downloadIT.starlight-91557fd73a43ab596f0fefb7c9aa0218b9a0b208.tar.gz
IT.starlight-91557fd73a43ab596f0fefb7c9aa0218b9a0b208.tar.bz2
IT.starlight-91557fd73a43ab596f0fefb7c9aa0218b9a0b208.zip
Add Azure DevOps social icon (#2199)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r--.changeset/moody-tips-help.md5
-rw-r--r--packages/starlight/__tests__/basics/config-errors.test.ts2
-rw-r--r--packages/starlight/components/Icons.ts3
-rw-r--r--packages/starlight/schemas/social.ts2
4 files changed, 11 insertions, 1 deletions
diff --git a/.changeset/moody-tips-help.md b/.changeset/moody-tips-help.md
new file mode 100644
index 00000000..41b4eb8e
--- /dev/null
+++ b/.changeset/moody-tips-help.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/starlight': patch
+---
+
+Adds Azure DevOps (`azureDevOps`) icon for use in social links.
diff --git a/packages/starlight/__tests__/basics/config-errors.test.ts b/packages/starlight/__tests__/basics/config-errors.test.ts
index fed2a3cd..281ec394 100644
--- a/packages/starlight/__tests__/basics/config-errors.test.ts
+++ b/packages/starlight/__tests__/basics/config-errors.test.ts
@@ -113,7 +113,7 @@ test('errors with bad social icon config', () => {
"[AstroUserError]:
Invalid config passed to starlight integration
Hint:
- **social.unknown**: Invalid enum value. Expected 'twitter' | 'mastodon' | 'github' | 'gitlab' | 'bitbucket' | 'discord' | 'gitter' | 'codeberg' | 'codePen' | 'youtube' | 'threads' | 'linkedin' | 'twitch' | 'microsoftTeams' | 'instagram' | 'stackOverflow' | 'x.com' | 'telegram' | 'rss' | 'facebook' | 'email' | 'reddit' | 'patreon' | 'signal' | 'slack' | 'matrix' | 'openCollective' | 'hackerOne' | 'blueSky' | 'discourse' | 'zulip' | 'pinterest', received 'unknown'
+ **social.unknown**: Invalid enum value. Expected 'twitter' | 'mastodon' | 'github' | 'gitlab' | 'bitbucket' | 'discord' | 'gitter' | 'codeberg' | 'codePen' | 'youtube' | 'threads' | 'linkedin' | 'twitch' | 'azureDevOps' | 'microsoftTeams' | 'instagram' | 'stackOverflow' | 'x.com' | 'telegram' | 'rss' | 'facebook' | 'email' | 'reddit' | 'patreon' | 'signal' | 'slack' | 'matrix' | 'openCollective' | 'hackerOne' | 'blueSky' | 'discourse' | 'zulip' | 'pinterest', received 'unknown'
**social.unknown**: Invalid url"
`
);
diff --git a/packages/starlight/components/Icons.ts b/packages/starlight/components/Icons.ts
index 4d762001..e93d30c4 100644
--- a/packages/starlight/components/Icons.ts
+++ b/packages/starlight/components/Icons.ts
@@ -92,6 +92,9 @@ export const BuiltInIcons = {
'<path d="M20.47 2H3.53a1.45 1.45 0 0 0-1.47 1.43v17.14A1.45 1.45 0 0 0 3.53 22h16.94a1.45 1.45 0 0 0 1.47-1.43V3.43A1.45 1.45 0 0 0 20.47 2ZM8.09 18.74h-3v-9h3v9ZM6.59 8.48a1.56 1.56 0 0 1 0-3.12 1.57 1.57 0 1 1 0 3.12Zm12.32 10.26h-3v-4.83c0-1.21-.43-2-1.52-2A1.65 1.65 0 0 0 12.85 13a2 2 0 0 0-.1.73v5h-3v-9h3V11a3 3 0 0 1 2.71-1.5c2 0 3.45 1.29 3.45 4.06v5.18Z"/>',
twitch:
'<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"/>',
+ azureDevOps:
+ '<path d="M17,4v9.74l-4,3.28-6.2-2.26V17L3.29,12.41l10.23.8V4.44Zm-3.41.49L7.85,1V3.29L2.58,4.84,1,6.87v4.61l2.26,1V6.57Z"/>',
+
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.69c.58 0 1.06.48 1.06 1.06v5.65a3.9 3.9 0 0 1-3.9 3.9h-.02z"/><path d="M1.02 5.02h10.24c.56 0 1.02.46 1.02 1.03v10.23a1.02 1.02 0 0 1-1.02 1.02H1.02A1.02 1.02 0 0 1 0 16.28V6.04c0-.56.46-1.02 1.02-1.02zm7.81 3.9V7.84H3.45v1.08h2.03v5.57h1.3V8.92h2.05z"/>',
instagram:
diff --git a/packages/starlight/schemas/social.ts b/packages/starlight/schemas/social.ts
index f901fa29..32348f7e 100644
--- a/packages/starlight/schemas/social.ts
+++ b/packages/starlight/schemas/social.ts
@@ -14,6 +14,7 @@ export const socialLinks = [
'threads',
'linkedin',
'twitch',
+ 'azureDevOps',
'microsoftTeams',
'instagram',
'stackOverflow',
@@ -62,6 +63,7 @@ export const SocialLinksSchema = () =>
threads: 'Threads',
linkedin: 'LinkedIn',
twitch: 'Twitch',
+ azureDevOps: 'Azure DevOps',
microsoftTeams: 'Microsoft Teams',
instagram: 'Instagram',
stackOverflow: 'Stack Overflow',