Tag definitions and new post
This commit is contained in:
+17
-1
@@ -4,7 +4,23 @@ const blogCollection = defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pubDate: z.string().transform((str) => new Date(str)),
|
||||
tags: z.array(z.string()),
|
||||
tags: z.array(
|
||||
z.union([
|
||||
z.literal('Apps'),
|
||||
z.literal('Gaming'),
|
||||
z.literal('Learning'),
|
||||
z.literal('Life'),
|
||||
z.literal('MacOS'),
|
||||
z.literal('Music'),
|
||||
z.literal('Making Stuff'),
|
||||
z.literal('Mental Health'),
|
||||
z.literal('Movies & TV'),
|
||||
z.literal('Programming'),
|
||||
z.literal('Tech'),
|
||||
z.literal('Tutorial'),
|
||||
z.literal('Web Dev'),
|
||||
])
|
||||
),
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user