mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: default post author to site author
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
|
import { SITE } from "@config";
|
||||||
import { defineCollection, z } from "astro:content";
|
import { defineCollection, z } from "astro:content";
|
||||||
|
|
||||||
const blog = defineCollection({
|
const blog = defineCollection({
|
||||||
type: "content",
|
type: "content",
|
||||||
schema: ({ image }) =>
|
schema: ({ image }) =>
|
||||||
z.object({
|
z.object({
|
||||||
author: z.string().optional(),
|
author: z.string().default(SITE.author),
|
||||||
pubDatetime: z.date(),
|
pubDatetime: z.date(),
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
postSlug: z.string().optional(),
|
postSlug: z.string().optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user