commit b44184254b4a696f1727400dd04895287ccd29df
parent 61d8d2e1aa4a2f5b946d9fc626796dfadb71ed88
Author: MTRNord <mtrnord1@gmail.com>
Date: Fri, 1 Mar 2024 13:41:00 +0100
Fix collection
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/content/config.ts b/src/content/config.ts
@@ -3,8 +3,8 @@ import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({
- schema: (context) => {
- return docsSchema()(context).extend({
+ schema: docsSchema({
+ extend: z.object({
info: z.optional(z.array(z.object({
title: z.optional(z.string()),
text: z.string()
@@ -12,7 +12,7 @@ export const collections = {
description: z.optional(z.string()),
recipe: z.optional(z.boolean())
})
- }
+ })
}),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};