Skip to content

Commit 83d27d1

Browse files
committed
docs(starlight): migrate social config from record to array shape
Starlight 0.33 (in the 0.30 → 0.39 bump landing here) changed the `social` integration option from a `Record<KnownPlatform, url>` map to a `[{icon, label, href}]` array. The old shape now fails the config schema with "Starlight v0.33.0 changed the `social` configuration syntax. Please specify an array of link items instead of an object." Migrating both the GitHub and Discord entries preserves the topbar icon row exactly. The pre-fix comment block at the call site already anticipated this exact migration; the surrounding rationale was moved into the new comment.
1 parent c880957 commit 83d27d1

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

docs/astro.config.mjs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,23 @@ export default defineConfig({
5858
attrs: { name: 'theme-color', content: '#ea580c' },
5959
},
6060
],
61-
// Starlight 0.30 takes `social` as a record keyed by platform
62-
// name (the schema is `Record<KnownPlatform, url>` in
63-
// node_modules/@astrojs/starlight/schemas/social.ts). Newer
64-
// Starlight (>= 0.32-ish) expanded this to the
65-
// `[{icon, label, href}]` array shape; bump this when the
66-
// dependency floor moves.
67-
social: {
68-
github: 'https://github.com/sbpp/sourcebans-pp',
69-
discord: 'https://discord.gg/4Bhj6NU',
70-
},
61+
// Starlight 0.33 changed `social` from a `Record<KnownPlatform, url>`
62+
// map to a `[{icon, label, href}]` array (see the changelog at
63+
// https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md#0330).
64+
// Migrated alongside the @astrojs/starlight ^0.30 → ^0.39 bump
65+
// in this PR.
66+
social: [
67+
{
68+
icon: 'github',
69+
label: 'GitHub',
70+
href: 'https://github.com/sbpp/sourcebans-pp',
71+
},
72+
{
73+
icon: 'discord',
74+
label: 'Discord',
75+
href: 'https://discord.gg/4Bhj6NU',
76+
},
77+
],
7178
editLink: {
7279
// Source of truth lives in sourcebans-pp; the deploy shell is
7380
// sbpp.github.io. Edit links point back here.

0 commit comments

Comments
 (0)