feat: default post author to site author

This commit is contained in:
tanishqmanuja
2023-09-20 14:56:50 +05:30
committed by Sat Naing
parent e9d4303219
commit 20c89709ad
+2 -1
View File
@@ -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(),