Skip to content

Commit

Permalink
Improve locales.root config typing
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Mar 27, 2023
1 parent 4de624c commit 180ed79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/starbook/utils/user-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export const StarbookConfigSchema = z.object({
tagline: z.string().optional().describe('The tagline for your website.'),
/** Configure locales for internationalization (i18n). */
locales: z
.record(LocaleSchema)
.object({
/** Configure a “root” locale to serve a default language from `/`. */
root: LocaleSchema.required({ lang: true }).optional(),
})
.catchall(LocaleSchema)
.optional()
.describe('Configure locales for internationalization (i18n).'),
});
Expand Down

0 comments on commit 180ed79

Please sign in to comment.