Changelog
🐞 Patch Changes
-
#3088
1885049Thanks @HiDeoo! - Fixes a regression in Starlight version0.33.0that caused the description and links to language alternates for multilingual websites to be missing from the<head>of the page. -
#3065
463adf5Thanks @HiDeoo! - Updates thesocialconfiguration option TSDoc example to match the shape of the expected value.
-

🍿 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".
-
🐞 Patch Changes
-
#3030
5bdf139Thanks @trueberryless! - Updates the type of theisFallbackfield in route data fromtruetoboolean, keeping it optional but allowingfalseas a possible value. -
#3018
188b8cfThanks @trueberryless! - Adds validation for user configrouteMiddlewareso it does not conflict with Astro’s middleware.
-
🐞 Patch Changes
-
#3021
e3f881eThanks @jsparkdev! - Updates Korean language support -
#3013
5b599ddThanks @oluwatobiss! - Adds Substack icon to social links list
-
🐞 Patch Changes
-
#2955
77b6a41Thanks @trueberryless! - Adds 5 new icons:figma,sketch,vim,vscode, andzed. -
#2961
da57fabThanks @ematipico! - Adds 1 new icon:jetbrains.
-
🐞 Patch Changes
-
#2926
c0170fdThanks @resoltico! - Adds Latvian language support -
#2918
790c000Thanks @HiDeoo! - Fixes a trailing slash inconsistency in generated sidebar links when using thetrailingSlash: 'ignore'Astro option (the default) between internal and auto-generated links. Starlight behavior for this configuration value is to use a trailing slash as many common hosting providers redirect to URLs with a trailing slash by default.
-

🍿 Minor Changes
-
#2390
f493361Thanks @delucis! - Moves route data toAstro.localsinstead of passing it down via component props⚠️ Breaking change: Previously, all of Starlight’s templating components, including user or plugin overrides, had access to a data object for the current route via
Astro.props. This data is now available asAstro.locals.starlightRouteinstead.To update, refactor any component overrides you have:
- Remove imports of
@astrojs/starlight/props, which is now deprecated. - Update code that accesses
Astro.propsto useAstro.locals.starlightRouteinstead. - Remove any spreading of
{...Astro.props}into child components, which is no longer required.
In the following example, a custom override for Starlight’s
LastUpdatedcomponent is updated for the new style:---import Default from '@astrojs/starlight/components/LastUpdated.astro';import type { Props } from '@astrojs/starlight/props';const { lastUpdated } = Astro.props;const { lastUpdated } = Astro.locals.starlightRoute;const updatedThisYear = lastUpdated?.getFullYear() === new Date().getFullYear();---{updatedThisYear && (<Default {...Astro.props}><slot /></Default><Default><slot /></Default>)}Community Starlight plugins may also need to be manually updated to work with Starlight 0.32. If you encounter any issues, please reach out to the plugin author to see if it is a known issue or if an updated version is being worked on.
- Remove imports of
-
#2578
f895f75Thanks @HiDeoo! - Deprecates the Starlight pluginsetuphook in favor of the newconfig:setuphook which provides the same functionality.⚠️ BREAKING CHANGE:
The Starlight plugin
setuphook is now deprecated and will be removed in a future release. Please update your plugins to use the newconfig:setuphook instead.export default {name: 'plugin-with-translations',hooks: {'setup'({ config }) {'config:setup'({ config }) {// Your plugin configuration setup code},},}; -
#2578
f895f75Thanks @HiDeoo! - Exposes the built-in localization system in the Starlight pluginconfig:setuphook.⚠️ BREAKING CHANGE:
This addition changes how Starlight plugins add or update translation strings used in Starlight’s localization APIs. Plugins previously using the
injectTranslations()callback function from the pluginconfig:setuphook should now use the same function available in thei18n:setuphook.export default {name: 'plugin-with-translations',hooks: {'config:setup'({ injectTranslations }) {'i18n:setup'({ injectTranslations }) {injectTranslations({en: {'myPlugin.doThing': 'Do the thing',},fr: {'myPlugin.doThing': 'Faire le truc',},});},},}; -
#2858
2df9d05Thanks @XREvo! - Adds support for Pagefind’s multisite search features -
#2578
f895f75Thanks @HiDeoo! - Adds a newHookParametersutility type to get the type of a plugin hook’s arguments. -
#2578
f895f75Thanks @HiDeoo! - Adds a newuseTranslations()callback function to the Starlight pluginconfig:setuphook to generate a utility function to access UI strings for a given language. -
#2578
f895f75Thanks @HiDeoo! - Adds a newabsolutePathToLang()callback function to the Starlight pluginconfig:setupto get the language for a given absolute file path.
🐞 Patch Changes
-
🐞 Patch Changes
- #2805
ed6f9fdThanks @HiDeoo! - Exposes theStarlightIconTypeScript type referencing the names of Starlight’s built-in icons.
- #2805

🍿 Minor Changes
-
#2777
88f4214Thanks @hippotastic! - Updatesastro-expressive-codedependency to the latest version (0.40).This includes an update to the latest Shiki version (1.26.1), providing access to all current Shiki themes and syntax highlighting languages, and adding the config options
shiki.engine,shiki.bundledLangs,shiki.langAliasandremoveUnusedThemes. It also adds new style variants to the optional collapsible sections plugin.See the Expressive Code release notes for full details.
-
#2736
29a885bThanks @delucis! - ⚠️ BREAKING CHANGE: The minimum supported version of Astro is now 5.1.5Please update Astro and Starlight together:
Terminal window npx @astrojs/upgrade -
#2728
e187383Thanks @delucis! - Updates minimum Pagefind dependency to v1.3.0, sets new defaults for Pagefind’s ranking options, and adds support for manually configuring the ranking optionsThe new ranking option defaults have been evaluated against Starlight’s own docs to improve the quality of search results. See “Customize Pagefind’s result ranking” for more details about how they work.
-
#157
23bf960Thanks @tony-sull! - Adds a print stylesheet to improve the appearance of Starlight docs pages when printed -
#2728
e187383Thanks @delucis! - Fixes Pagefind logging to respect the Astro log level. When using Astro’s--verboseor--silentCLI flags, these are now respected by Pagefind as well.
🐞 Patch Changes
-
#2792
412effbThanks @dhruvkb! - Uses semanticvar(--sl-color-hairline)for the page sidebar border instead ofvar(--sl-color-gray-6). This is visually the same as previously but makes it easier to override the hairline color consistently across a site. -
#2736
29a885bThanks @delucis! - Updates internal dependencies@astrojs/sitemapand@astrojs/mdxto the latest versions -
#2782
d9d415bThanks @delucis! - Fixes a documentation link in the JSDoc comment for theStarlightExpressiveCodeOptionstype -
#2708
442c819Thanks @delucis! - Fixes colour contrast correction in code blocks
-
🐞 Patch Changes
-
#2747
474c27eThanks @bbag! - Ensures<Tab>component toggling is stable when smooth scrolling is enabled via custom CSS -
#2740
0e169c9Thanks @HiDeoo! - Fixes an issue preventing Pagefind to be disabled using thepagefindfrontmatter field. -
#2732
a10b466Thanks @Sidnioulz! - Adds Storybook, Confluence and Jira social icons
-
🐞 Patch Changes
-
#2717
c5fcbb3Thanks @delucis! - Fixes a list item spacing issue where line break elements (<br>) could receive a margin, breaking layout in Firefox -
#2724
02d7ac6Thanks @dionysuzx! - Adds social link support for Farcaster -
#2635
ec4b851Thanks @HiDeoo! - Fixes an issue where the language picker in multilingual sites could display the wrong language when navigating between pages with the browser back/forward buttons.
-
-
#2612
8d5a4e8Thanks @HiDeoo! - Adds support for Astro v5, drops support for Astro v4.Upgrade Astro and dependencies
⚠️ BREAKING CHANGE: Astro v4 is no longer supported. Make sure you update Astro and any other official integrations at the same time as updating Starlight:
Terminal window npx @astrojs/upgradeCommunity Starlight plugins and Astro integrations may also need to be manually updated to work with Astro v5. If you encounter any issues, please reach out to the plugin or integration author to see if it is a known issue or if an updated version is being worked on.
Update your collections
⚠️ BREAKING CHANGE: Starlight’s internal content collections, which organize, validate, and render your content, have been updated to use Astro’s new Content Layer API and require configuration changes in your project.
-
Move the content config file. This file no longer lives within the
src/content/config.tsfolder and should now exist atsrc/content.config.ts. -
Edit the collection definition(s). To update the
docscollection, aloaderis now required:src/content.config.ts import { defineCollection } from "astro:content";import { docsLoader } from "@astrojs/starlight/loaders";import { docsSchema } from "@astrojs/starlight/schema";export const collections = {docs: defineCollection({ schema: docsSchema() }),docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),};If you are using the
i18ncollection to provide translations for additional languages you support or override our default labels, you will need to update the collection definition in a similar way and remove the collectiontypewhich is no longer available:src/content.config.ts import { defineCollection } from "astro:content";import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders";import { docsSchema, i18nSchema } from "@astrojs/starlight/schema";export const collections = {docs: defineCollection({ schema: docsSchema() }),docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),i18n: defineCollection({ type: 'data', schema: i18nSchema() }),i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),}; -
Update other collections. To update any other collections you may have, follow the “Updating existing collections” section in the Astro 5 upgrade guide.
If you are unable to make any changes to your collections at this time, including Starlight’s default
docsandi18ncollections, you can enable thelegacy.collectionsflag to upgrade to v5 without updating your collections. This legacy flag exists to provide temporary backwards compatibility, and will allow you to keep your collections in their current state until the legacy flag is no longer supported. -
-
#2669
310df7dThanks @aaronperezaguilera! - Adds Catalan UI translations -
#2664
62ff007Thanks @HiDeoo! - Publishes provenance containing verifiable data to link a package back to its source repository and the specific build instructions used to publish it. -
#2670
0223b42Thanks @aaronperezaguilera! - Adds Spanish UI translations for the Pagefind search modal
-
🐞 Patch Changes
-
#2642
12750aeThanks @dragomano! - Updates Russian UI translations -
#2656
4d543beThanks @HiDeoo! - Improves error message when an invalid configuration or no configuration is provided to the Starlight integration. -
#2645
cf12bebThanks @techfg! - Fixes support for favicon URLs that contain a search query and/or hash -
#2650
38db4ecThanks @raviqqe! - Moves@types/js-yamlpackage to non-dev dependencies -
#2633
5adb720Thanks @HiDeoo! - Fixes a VoiceOver issue with Safari where the content of a<script>element could be read before the sidebar content. -
#2663
34755f9Thanks @astrobot-houston! - Adds a newseti:viteicon for Vite configuration files in the<FileTree>component
-