Skip to content

Commit

Permalink
feat: default post author to site author
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishqmanuja authored and satnaing committed Sep 25, 2023
1 parent e9d4303 commit 20c8970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down

0 comments on commit 20c8970

Please sign in to comment.