Article

Starlight 0.39: Flexible Sidebars & Better Multilingual Docs

Starlight 0.39 makes autogenerated sidebar links combinable within groups and sharpens multilingual docs with x-default links, CJK spacing, and i18next v26.

Editorial Team EN

Starlight 0.39 makes the autogenerated sidebar no longer all-or-nothing, and tightens the multilingual story with new hreflang behavior, better CJK spacing, and a major bump to its translation engine. Starlight is Astro's official package for building fast, accessible documentation sites, and it tracks the wider Astro 6 release line.

What changed in the Starlight 0.39 sidebar?

Starlight 0.39 lets you combine autogenerated sidebar links with manually defined entries inside one group. Before this release, an items array that used autogenerate had to stand alone. Now you mix a directory scan with hand-picked links and nested groups in the same block, so navigation matches how readers should move through the docs.

The old constraint forced an awkward choice. A section with ten generated pages plus one external link meant either listing all eleven by hand or splitting them into two separate groups. With 0.39 you keep the autogenerate entry for the directory and drop a plain link object beside it in the same items list.

A "Reference" group can autogenerate from a folder and still pin a "Changelog" link or an external API spec at the bottom. The generated order stays automatic; the curated entries stay where you put them, with less duplication and fewer config edits when files get added.

Spacing fixes that lean on :has()

Two styling adjustments land in this release. Starlight now uses :has() to correct the spacing of nested lists, so deeply indented bullet structures read cleanly instead of bunching up, replacing a pile of override rules with one modern selector.

The second tweak sets scrollbar-gutter: stable on the layout. That reserves space for the scrollbar whether or not it shows, which kills the horizontal content jump between a short page and a long one. On a docs site where every page swap is a potential layout shift, stable gutters help both feel and Cumulative Layout Shift.

Multilingual docs get three upgrades

The headline i18n addition is x-default hreflang meta links. For a site translated into several languages, this tag tells search engines which page to serve when a visitor's language matches none of your locales. Without it, that fallback is left to a crawler's guess; with it, you state the default explicitly and the generated hreflang set covers the gap.

Cleaner CJK typography

Starlight 0.39 applies text-autospace for CJK content, inserting the small amount of spacing that Chinese, Japanese, and Korean text needs where it meets Latin characters or numerals. Docs in those languages then read the way native readers expect, instead of cramming a code token straight against a glyph.

i18next jumps from v23 to v26

Under the hood, Starlight moves its translation library i18next from v23 to v26. That three-major jump usually carries breaking changes worth a glance if you ship custom UI translations or plugins that read the i18n APIs. For most authors the upgrade is invisible and just keeps the dependency current; if you touch the translation internals, check the i18next migration notes before bumping.

Should you update?

For most sites this is a low-risk bump: the sidebar change is additive, the styling fixes are pure refinement, and the SEO and CJK work only help multilingual docs. The one place to slow down is the i18next jump if you maintain custom translations. The multilingual routing this builds on landed in the Astro 6.0 baseline, and the broader Astro topic hub collects the rest of the release coverage.