Minor Changes
-
#3618
dcf6d09Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: This release changes how autogenerated links work in Starlight’s sidebar configuration.If you have sidebar groups using the
autogeneratekey, you must now wrap that configuration in anitemsarray:{ label: 'My group', - autogenerate: { directory: 'some-dir' }, + items: [{ autogenerate: { directory: 'some-dir' } }], }This change unlocks the possibility to mix autogenerated links and other links in a single group, for example:
{ label: 'Mixed group', items: [ 'example-page', { autogenerate: { directory: 'examples' } }, { label: 'More examples', link: 'https://example.com' }, ], }
This release also updates the shape of autogenerated sidebar entries in route data. Autogenerated links and groups in
Astro.locals.starlightRoute.sidebarnow include anautogenerateobject with the configureddirectoryvalue:{ type: 'link', label: 'Example', href: '/examples/example/', isCurrent: false, autogenerate: { directory: 'examples' } }
-
#3618
dcf6d09Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: This release changes the default collapsed state of autogenerated sidebar subgroups.Autogenerated subgroups no longer inherit the
collapsedvalue from their parent group. They are now expanded by default unless explicitly configured withautogenerate.collapsed.If your sidebar configuration relies on a collapsed parent group to also collapse its autogenerated subgroups, update your configuration to set
autogenerate.collapsedtotrue:{ label: 'Reference', collapsed: true, items: [ - { autogenerate: { directory: 'reference' } }, + { autogenerate: { directory: 'reference', collapsed: true } }, ], } -
#3845
4d755f5Thanks @delucis! - Adds a<link rel="alternate" hreflang="x-default" href="...">tag pointing to the default locale in multilingual sites. Thex-defaultalternate is used as a signal of which language to fall back to if no other is available. Learn more in Google’s SEO localization docs. -
#3862
ec70630Thanks @itrew! - Makes spacing of items in nested lists more consistent -
#3872
417a66cThanks @tats-u! - Enables the CSS propertytext-autospacein Chinese and Japanese documents.If you would prefer to disable autospacing in Chinese and Japanese pages, you can add the following custom CSS to your site:
[lang]:where(:lang(zh, ja)) { text-autospace: initial; }
-
#3797
9764ebdThanks @delucis! - Avoids the risk of layout shift when users expand and collapse sidebar groupsThis release can introduce additional padding to the site sidebar on certain devices to reserve space for scrollbars. You may wish to inspect your site sidebar visually when upgrading.
If you would prefer to keep the previous styling, you can add the following custom CSS to your site:
.sidebar-pane { scrollbar-gutter: auto; }
-
#3858
6672c35Thanks @delucis! - Updatesi18next, used for Starlight’s localization APIs, from v23 to v26There should not be any user-facing changes from this update