From dd25fea9edde9444fdc83d44a6600e721f989c19 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Tue, 23 May 2023 13:33:21 -0300 Subject: [docs] defaultLocale conflict when using root --- docs/src/content/docs/guides/i18n.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/content/docs/guides/i18n.md b/docs/src/content/docs/guides/i18n.md index eb2afc76..c2e83c53 100644 --- a/docs/src/content/docs/guides/i18n.md +++ b/docs/src/content/docs/guides/i18n.md @@ -58,7 +58,7 @@ Starlight provides built-in support for multilingual sites, including routing, f You can use a “root” locale to serve a language without any i18n prefix in its path. For example, if English is your root locale, an English page path might look like `/about` instead of `/en/about`. -To set a root locale, use the `root` key in your `locales` config: +To set a root locale, use the `root` key in your `locales` config and remove `defaultLocale` (or set to `root`): ```js // astro.config.mjs @@ -68,6 +68,7 @@ import starlight from '@astrojs/starlight'; export default defineConfig({ integrations: [ starlight({ + defaultLocale: 'root', // optional locales: { root: { label: 'English', -- cgit From 59b3ebdc8fd54ebe241b4459834e447355c896b1 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Wed, 24 May 2023 08:30:09 -0300 Subject: technically possible Co-authored-by: Chris Swithinbank --- docs/src/content/docs/guides/i18n.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/guides/i18n.md b/docs/src/content/docs/guides/i18n.md index f4c39bb7..55093723 100644 --- a/docs/src/content/docs/guides/i18n.md +++ b/docs/src/content/docs/guides/i18n.md @@ -59,7 +59,7 @@ Starlight provides built-in support for multilingual sites, including routing, f You can use a “root” locale to serve a language without any i18n prefix in its path. For example, if English is your root locale, an English page path might look like `/about` instead of `/en/about`. -To set a root locale, use the `root` key in your `locales` config and remove `defaultLocale` (or set to `root`): +To set a root locale, use the `root` key in your `locales` config. If the root locale is also the default locale for your content, remove `defaultLocale` or set it to `'root'`. ```js // astro.config.mjs -- cgit