mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 05:13:02 -05:00
chore(): update config object to astro 4.0.0 format
This commit is contained in:
@@ -13,28 +13,39 @@ const authors = defineCollection({
|
||||
|
||||
const docs = defineCollection({
|
||||
schema: (ctx) =>
|
||||
docsSchema()(ctx).extend({
|
||||
noCommentSection: z.boolean().optional().default(false),
|
||||
challenge: z
|
||||
.object({
|
||||
label: z.string().default('Challenge'),
|
||||
number: z.union([z.number(), z.boolean()]).default(false),
|
||||
})
|
||||
.optional(),
|
||||
author: reference('authors').optional(),
|
||||
command: z.string().optional(),
|
||||
blogLink: z.string().optional(),
|
||||
videoLink: z
|
||||
.object({
|
||||
link: z.string(),
|
||||
alt: z.string(),
|
||||
flag: z.enum(['FR']).optional(),
|
||||
})
|
||||
.optional(),
|
||||
}),
|
||||
docsSchema({
|
||||
extend: z.object({
|
||||
noCommentSection: z.boolean().optional().default(false),
|
||||
challenge: z
|
||||
.object({
|
||||
label: z.string().default('Challenge'),
|
||||
number: z.union([z.number(), z.boolean()]).default(false),
|
||||
})
|
||||
.optional(),
|
||||
author: reference('authors').optional(),
|
||||
command: z.string().optional(),
|
||||
blogLink: z.string().optional(),
|
||||
videoLink: z
|
||||
.object({
|
||||
link: z.string(),
|
||||
alt: z.string(),
|
||||
flag: z.enum(['FR']).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 = {
|
||||
docs: docs,
|
||||
|
||||
Reference in New Issue
Block a user