Starlight Changelog
0.32.1
Patch Changes
0.32.0
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
- #2848
9b32ba9Thanks @HiDeoo! - Fixes styling of filter and metadata elements in Pagefind search UI.
0.31.1
Patch Changes
- #2805
ed6f9fdThanks @HiDeoo! - Exposes theStarlightIconTypeScript type referencing the names of Starlight’s built-in icons.
0.31.0
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
0.30.6
Patch Changes
-
#2722
0b206d3Thanks @techfg! - Fixes display of long site title on mobile -
#2762
7ab1576Thanks @HiDeoo! - Prevents the header title from being translated by automatic translation systems.
0.30.5
Patch Changes
-
#2757
e7b0e74Thanks @HiDeoo! - Fixes a UI string translation issue for languages with a region subtag. -
#2760
aec9eddThanks @HiDeoo! - Adds 5 new icons:left-caret,up-arrow,down-arrow,download, andcloud-download.
0.30.4
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
0.30.3
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.
0.30.2
Patch Changes
-
#2702
02d16f3Thanks @HiDeoo! - Fixes an issue with autogenerated sidebars when using Starlight with Astro’s new Content Layer API with directories containing spaces or special characters. -
#2704
fd16470Thanks @delucis! - Fixes display of focus indicator around site title