#334110f6fe2 Thanks @HiDeoo! - Prevents potential build issues with the Astro Cloudflare adapter due to the dependency on Node.js builtins.
#3327bf58c60 Thanks @delucis! - Fixes a routing bug for docs pages with a slug authored with non-normalized composition. This could occur for filenames containing diacritics in some circumstances, causing 404s.
Previously, content set in banner in page frontmatter was indexed by Starlight’s default search provider Pagefind. This could cause unexpected search results, especially for sites setting a common banner content on multiple pages. Starlight’s default Banner component is now excluded from search indexing.
This change does not impact Banner overrides using custom components.
#327480ccff7 Thanks @HiDeoo! - Fixes an issue where some Starlight remark and rehype plugins were transforming Markdown and MDX content in non-Starlight pages.
⚠️ BREAKING CHANGE:
Previously, some of Starlight’s remark and rehype plugins, most notably the plugin transforming Starlight’s custom Markdown syntax for rendering asides, were applied to all Markdown and MDX content. This included content from individual Markdown pages and content from content collections other than the docs collection used by Starlight.
This change restricts the application of Starlight’s remark and rehype plugins to only Markdown and MDX content loaded using Starlight’s docsLoader(). If you were relying on this behavior, please let us know about your use case in the dedicated #starlight channel in the Astro Discord or by opening an issue.
🐞 Patch Changes
#32661161af0 Thanks @HiDeoo! - Ensures invalid sidebar group configurations using the attrs option are properly reported as a type error.
Previously, invalid sidebar group configurations using the attrs option were not reported as a type error but only surfaced at runtime. This change is only a type-level change and does not affect the runtime behavior of Starlight which does not support the attrs option for sidebar groups.
#327480ccff7 Thanks @HiDeoo! - Prevents Starlight remark and rehype plugins from transforming Markdown and MDX content when using the Astro renderMarkdown() content loader API.
#330621fcd94 Thanks @HiDeoo! - Fixes a regression in Starlight version 0.34.5 that caused multilingual sites with a default locale explicitly set to root to report a configuration error.
#320595d124a Thanks @sgalcheung! - Fixes an issue preventing to use the <StarlightPage> component when the docs content collection that Starlight uses does not exist.
#3206e6ea584 Thanks @HiDeoo! - Fixes a text selection issue for heading with a clickable anchor link when using double click to select text in Chrome and Safari.
#3058274cc06 Thanks @techfg! - Fixes display of focus indicator around site title
#3181449c822 Thanks @HiDeoo! - Fixes an issue where all headings in Markdown and MDX content were rendered with a clickable anchor link, even in non-Starlight pages.
#3168ca693fe Thanks @jsparkdev! - Updates Korean langage support with improvements and missing translations
#3153ea31f46 Thanks @SuperKXT! - Fixes hover styles for highlighted directory in FileTree component.
#2905b5232bc Thanks @HiDeoo! - Fixes a potential issue for projects with dynamic routes added by an user, an Astro integration, or a Starlight plugin where some styles could end up being missing.
#316580a7871 Thanks @KianNH! - Increases maxBuffer for an internal spawnSync() call to support larger Git commit histories when using Starlight’s lastUpdated feature.
This change allows for easier customization of Starlight’s CSS as any custom unlayered CSS will override the default styles. If you are using cascade layers in your custom CSS, you can use the @layer CSS at-rule to define the order of precedence for different layers including the ones used by Starlight.
We recommend checking your site’s appearance when upgrading to make sure there are no style regressions caused by this change.
#31223a087d8 Thanks @delucis! - Removes default attrs and content values from head entries parsed using Starlight’s schema.
Previously when adding head metadata via frontmatter or user config, Starlight would automatically add values for attrs and content if not provided. Now, these properties are left undefined.
This makes it simpler to add tags in route middleware for example as you no longer need to provide empty values for attrs and content:
This is mostly an internal API but if you are overriding Starlight’s Head component or processing head entries in some way, you may wish to double check your handling of Astro.locals.starlightRoute.head is compatible with attrs and content potentially being undefined.
#30338c19678 Thanks @delucis! - Adds support for generating clickable anchor links for headings.
By default, Starlight now renders an anchor link beside headings in Markdown and MDX content. A new <AnchorHeading> component is available to achieve the same thing in custom pages built using <StarlightPage>.
If you want to disable this new Markdown processing set the markdown.headingLinks option in your Starlight config to false:
starlight({
title: 'My docs',
markdown: {
headingLinks: false,
},
}),
⚠️ BREAKING CHANGE: The minimum supported version of Astro is now v5.5.0.
Previously, Starlight used to automatically provide a fallback theme for Shiki, the default syntax highlighter built into Astro if the configured Shiki theme was not github-dark.
This fallback was only relevant when the default Starlight code block renderer, Expressive Code, was disabled and Shiki was used. Starlight no longer provides this fallback.
If you were relying on this behavior, you now manually need to update your Astro configuration to use the Shiki css-variables theme to match the previous behavior.
import { defineConfig } from 'astro/config';
export default defineConfig({
markdown: {
shikiConfig: {
theme: 'css-variables',
},
},
});
Additionally, you can use custom CSS to control the appearance of the code blocks. Here are the previously used CSS variables for the fallback theme:
#30881885049 Thanks @HiDeoo! - Fixes a regression in Starlight version 0.33.0 that caused the description and links to language alternates for multilingual websites to be missing from the <head> of the page.
#3065463adf5 Thanks @HiDeoo! - Updates the social configuration option TSDoc example to match the shape of the expected value.
#302682deb84 Thanks @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.
⚠️ BREAKING CHANGE: The social configuration option has changed syntax. You will need to update this in astro.config.mjs when 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 social syntax to the new:
#2927c46904c Thanks @HiDeoo! - Adds the head route 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 as Astro.locals.starlightRoute.head instead and can be modified using route data middleware.
The <Head> component now only renders the tags provided in Astro.locals.starlightRoute.head.
#29246a56d1b Thanks @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:
<Badgetext="New" />
Feature
The rendered text would previously include a space between the badge and the text due to the trailing space automatically added by the component:
New Feature
Such code will now render the badge and text without a space:
NewFeature
To fix this, you can add a space between the badge and the text:
<Badge text="New" />Feature
<Badge text="New" /> Feature
#27277c8fa30 Thanks @techfg! - Updates mobile menu toggle styles to display a close icon while the menu is open
#3025f87e9ac Thanks @delucis! - Fixes Starlight’s autogenerated <meta name="twitter:site"> tags when a Twitter link is set in social config. Previously these incorrectly rendered content="/username" and now correctly render content="@username".
#30305bdf139 Thanks @trueberryless! - Updates the type of the isFallback field in route data from true to boolean, keeping it optional but allowing false as a possible value.