Starlight has built-in support for displaying many social links to the website header using the Starlight social configuration option.
But sometimes, you may want to add a custom social link that is not supported by Starlight or you cannot wait for it to be added.
Using component overrides, you can add custom social links to Starlight like the last one in the following example:
Create a custom Astro component to replace the existing <SocialIcons/> built-in component:
Configure Starlight to use this new component instead of the built-in one by specifying its path in the components configuration option in your astro.config.mjs file:
Update the custom component previously created in src/components/SocialIcons.astro to add a custom social link and render its SVG icon before or after the existing social links:
You can find the complete source code of this guide in this StackBlitz example.