From 20c89709ada7e7c3f49460d6690d02999ba86d17 Mon Sep 17 00:00:00 2001 From: tanishqmanuja Date: Wed, 20 Sep 2023 14:56:50 +0530 Subject: [PATCH] feat: default post author to site author --- src/content/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/config.ts b/src/content/config.ts index 55380de..9f2754f 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,10 +1,11 @@ +import { SITE } from "@config"; import { defineCollection, z } from "astro:content"; const blog = defineCollection({ type: "content", schema: ({ image }) => z.object({ - author: z.string().optional(), + author: z.string().default(SITE.author), pubDatetime: z.date(), title: z.string(), postSlug: z.string().optional(),