@astrojs/starlight 0.34.7 → 0.34.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.34.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3306](https://github.com/withastro/starlight/pull/3306) [`21fcd94`](https://github.com/withastro/starlight/commit/21fcd944d528557b89fc8b351579beabdcc06ff6) Thanks [@HiDeoo](https://github.com/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.
8
+
3
9
  ## 0.34.7
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.34.7",
3
+ "version": "0.34.8",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
package/utils/i18n.ts CHANGED
@@ -57,7 +57,10 @@ function getAstroI18nConfig(config: StarlightConfig): NonNullable<AstroConfig['i
57
57
  // In Starlight, this matches the `locale` property if defined, and we fallback to the `lang`
58
58
  // property if not (which would be set to the language’s directory name by default).
59
59
  defaultLocale:
60
- config.defaultLocale.locale ?? config.defaultLocale.lang ?? BuiltInDefaultLocale.lang,
60
+ // If the default locale is explicitly set to `root`, we use the `lang` property instead.
61
+ (config.defaultLocale.locale === 'root'
62
+ ? config.defaultLocale.lang
63
+ : (config.defaultLocale.locale ?? config.defaultLocale.lang)) ?? BuiltInDefaultLocale.lang,
61
64
  locales: config.locales
62
65
  ? Object.entries(config.locales).map(([locale, localeConfig]) => {
63
66
  return {