mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 06:13:03 -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({
|
const docs = defineCollection({
|
||||||
schema: (ctx) =>
|
schema: (ctx) =>
|
||||||
docsSchema()(ctx).extend({
|
docsSchema({
|
||||||
noCommentSection: z.boolean().optional().default(false),
|
extend: z.object({
|
||||||
challenge: z
|
noCommentSection: z.boolean().optional().default(false),
|
||||||
.object({
|
challenge: z
|
||||||
label: z.string().default('Challenge'),
|
.object({
|
||||||
number: z.union([z.number(), z.boolean()]).default(false),
|
label: z.string().default('Challenge'),
|
||||||
})
|
number: z.union([z.number(), z.boolean()]).default(false),
|
||||||
.optional(),
|
})
|
||||||
author: reference('authors').optional(),
|
.optional(),
|
||||||
command: z.string().optional(),
|
author: reference('authors').optional(),
|
||||||
blogLink: z.string().optional(),
|
command: z.string().optional(),
|
||||||
videoLink: z
|
blogLink: z.string().optional(),
|
||||||
.object({
|
videoLink: z
|
||||||
link: z.string(),
|
.object({
|
||||||
alt: z.string(),
|
link: z.string(),
|
||||||
flag: z.enum(['FR']).optional(),
|
alt: z.string(),
|
||||||
})
|
flag: z.enum(['FR']).optional(),
|
||||||
.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,
|
||||||
|
|||||||
Reference in New Issue
Block a user