0.39.0
Release Image

🍿 Minor Changes

  • #3618 dcf6d09 Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: This release changes how autogenerated links work in Starlight’s sidebar configuration.

    If you have sidebar groups using the autogenerate key, you must now wrap that configuration in an items array:

    {
    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.sidebar now include an autogenerate object with the configured directory value:

    {
    type: 'link',
    label: 'Example',
    href: '/examples/example/',
    isCurrent: false,
    autogenerate: { directory: 'examples' }
    }
  • #3618 dcf6d09 Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: This release changes the default collapsed state of autogenerated sidebar subgroups.

    Autogenerated subgroups no longer inherit the collapsed value from their parent group. They are now expanded by default unless explicitly configured with autogenerate.collapsed.

    If your sidebar configuration relies on a collapsed parent group to also collapse its autogenerated subgroups, update your configuration to set autogenerate.collapsed to true:

    {
    label: 'Reference',
    collapsed: true,
    items: [
    { autogenerate: { directory: 'reference' } },
    { autogenerate: { directory: 'reference', collapsed: true } },
    ],
    }
  • #3845 4d755f5 Thanks @delucis! - Adds a <link rel="alternate" hreflang="x-default" href="..."> tag pointing to the default locale in multilingual sites. The x-default alternate 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 ec70630 Thanks @itrew! - Makes spacing of items in nested lists more consistent

  • #3872 417a66c Thanks @tats-u! - Enables the CSS property text-autospace in 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 9764ebd Thanks @delucis! - Avoids the risk of layout shift when users expand and collapse sidebar groups

    This 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 6672c35 Thanks @delucis! - Updates i18next, used for Starlight’s localization APIs, from v23 to v26

    There should not be any user-facing changes from this update