Unix: add new content schema for unix

This commit is contained in:
Akemi Izuko 2023-12-29 16:58:14 -07:00
parent c8ffa65beb
commit 74d727d2ea
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC

View file

@ -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 };