chore(): update config object to astro 4.0.0 format

This commit is contained in:
Eduardo Roth
2023-12-19 22:41:29 -06:00
parent 704aac0715
commit 9804f11c16

View File

@@ -13,7 +13,8 @@ const authors = defineCollection({
const docs = defineCollection({ const docs = defineCollection({
schema: (ctx) => schema: (ctx) =>
docsSchema()(ctx).extend({ docsSchema({
extend: z.object({
noCommentSection: z.boolean().optional().default(false), noCommentSection: z.boolean().optional().default(false),
challenge: z challenge: z
.object({ .object({
@@ -32,9 +33,19 @@ const docs = defineCollection({
}) })
.optional(), .optional(),
}), }),
})(ctx),
}); });
const i18n = defineCollection({ type: 'data', schema: i18nSchema() }); const i18n = defineCollection({
type: 'data',
schema: i18nSchema({
extend: z.object({
'author.createdBy': z.string(),
'buttons.star': z.string(),
'buttons.sponsor': z.string(),
}),
}),
});
export const collections = { export const collections = {
docs: docs, docs: docs,