Unix: add new content schema for unix
This commit is contained in:
parent
c8ffa65beb
commit
74d727d2ea
1 changed files with 13 additions and 1 deletions
|
@ -13,4 +13,16 @@ const blog = defineCollection({
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const collections = { blog };
|
const unix = defineCollection({
|
||||||
|
type: 'content',
|
||||||
|
// Type-check frontmatter using a schema
|
||||||
|
schema: z.object({
|
||||||
|
title: z.string(),
|
||||||
|
description: z.string(),
|
||||||
|
// Transform string to Date object
|
||||||
|
updateDate: z.coerce.date(),
|
||||||
|
heroImage: z.string().optional(),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const collections = { blog, unix };
|
||||||
|
|
Loading…
Reference in a new issue