From 85f8bc67ff36f9f0033c6bd601c9b77250a87aaa Mon Sep 17 00:00:00 2001 From: satnaing Date: Mon, 30 Jan 2023 21:26:05 +0630 Subject: [PATCH] refactor: add default tag if no tag is specified in post --- src/content/_schemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/_schemas.ts b/src/content/_schemas.ts index 9ee5319..b1c4d05 100644 --- a/src/content/_schemas.ts +++ b/src/content/_schemas.ts @@ -7,7 +7,7 @@ export const blogSchema = z.object({ postSlug: z.string().optional(), featured: z.boolean().optional(), draft: z.boolean().optional(), - tags: z.array(z.string()), + tags: z.array(z.string()).default(["others"]), ogImage: z.string().optional(), description: z.string(), });