
🍿 Minor Changes
-
#3026
82deb84Thanks @HiDeoo! - Fixes a potential list styling issue if the last element of a list item is a<script>tag.⚠️ BREAKING CHANGE:
This release drops official support for Chromium-based browsers prior to version 105 (released 30 August 2022) and Firefox-based browsers prior to version 121 (released 19 December 2023). You can find a list of currently supported browsers and their versions using this browserslist query.
With this release, Starlight-generated sites will still work fine on those older browsers except for this small detail in list item styling, but future releases may introduce further breaking changes for impacted browsers, including in patch releases.
-
#3025
f87e9acThanks @delucis! - Makessocialconfiguration more flexible.⚠️ BREAKING CHANGE: The
socialconfiguration option has changed syntax. You will need to update this inastro.config.mjswhen upgrading.Previously, a limited set of platforms were supported using a shorthand syntax with labels built in to Starlight. While convenient, this approach was less flexible and required dedicated code for each social platform added.
Now, you must specify the icon and label for each social link explicitly and you can use any of Starlight’s built-in icons for social links.
The following example shows updating the old
socialsyntax to the new:social: {github: 'https://github.com/withastro/starlight',discord: 'https://astro.build/chat',},social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/starlight' },{ icon: 'discord', label: 'Discord', href: 'https://astro.build/chat' },], -
#2927
c46904cThanks @HiDeoo! - Adds theheadroute data property which contains an array of all tags to include in the<head>of the current page.Previously, the
<Head>component was responsible for generating a list of tags to include in the<head>of the current page and rendering them. This data is now available asAstro.locals.starlightRoute.headinstead and can be modified using route data middleware. The<Head>component now only renders the tags provided inAstro.locals.starlightRoute.head. -
#2924
6a56d1bThanks @HiDeoo! - ⚠️ BREAKING CHANGE: Ensures that the<Badge>and<Icon>components no longer render with a trailing space.In Astro, components that include styles render with a trailing space which can prevent some use cases from working as expected, e.g. when using such components inlined with text. This change ensures that the
<Badge>and<Icon>components no longer render with a trailing space.If you were previously relying on that implementation detail, you may need to update your code to account for this change. For example, considering the following code:
<Badge text="New" />FeatureThe rendered text would previously include a space between the badge and the text due to the trailing space automatically added by the component:
New FeatureSuch code will now render the badge and text without a space:
NewFeatureTo fix this, you can add a space between the badge and the text:
<Badge text="New" />Feature<Badge text="New" /> Feature -
#2727
7c8fa30Thanks @techfg! - Updates mobile menu toggle styles to display a close icon while the menu is open
🐞 Patch Changes
-
#2927
c46904cThanks @HiDeoo! - Fixes an issue where overriding the canonical URL of a page using theheadconfiguration option orheadfrontmatter field would strip any other<link>tags from the<head>. -
#2927
c46904cThanks @HiDeoo! - Fixes an issue where generated canonical URLs would include a trailing slash when using thetrailingSlashAstro option is set to'never'. -
#3025
f87e9acThanks @delucis! - Fixes Starlight’s autogenerated<meta name="twitter:site">tags when a Twitter link is set insocialconfig. Previously these incorrectly renderedcontent="/username"and now correctly rendercontent="@username".