Skip to content

starlight soclal config is an array now #141

@stephenh

Description

@stephenh

Describe the bug

Since withastro/starlight#3025 landed, the social config is an array, so this part of the starlight blog's configuration:

          social: {
            ...starlightConfig.social,
            ...(astroConfig.site && rssLink && !starlightConfig.social?.rss
              ? {
                  rss: rssLink,
                }
              : {}),
          },

Reverts my astro.config.mjs social-is-an-array back to a hash, which then fails validation on boot:

$ yarn astro check
19:19:21 [ERROR] [@astrojs/starlight] An unhandled error occurred while running the "astro:config:setup" hook
[AstroUserError] Invalid config update provided by the 'starlight-blog-plugin' plugin
  Hint:
    Starlight v0.33.0 changed the `social` configuration syntax. Please specify an array of link items instead of an object.
    See the Starlight changelog for details: https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md#0330

    social: Expected type `"array"`, received `"object"`

To Reproduce

Update to latest starlight.

Expected behavior

The social config should be appended, not converted to a hash.

How often does this bug happen?

Every time

System Info

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions