feat(06-01): extend blogSchema with draft/wordCount/minutes fields
- Add draft: z.boolean().optional().default(false) to allow .where('draft','=',false)
- Add wordCount + minutes as optional (injected by Nitro hook at parse time)
- Collections blog_fr/blog_en unchanged (schema is referenced by variable)
This commit is contained in:
@@ -6,6 +6,9 @@ const blogSchema = z.object({
|
|||||||
date: z.string(),
|
date: z.string(),
|
||||||
tags: z.array(z.string()).optional(),
|
tags: z.array(z.string()).optional(),
|
||||||
image: z.string().optional(),
|
image: z.string().optional(),
|
||||||
|
draft: z.boolean().optional().default(false),
|
||||||
|
wordCount: z.number().optional(),
|
||||||
|
minutes: z.number().optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
export default defineContentConfig({
|
export default defineContentConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user