feat: multi-author support, back to top

This commit is contained in:
enscribe 2024-09-12 01:33:52 -07:00
parent 4382f7165c
commit 77bf1bbdf4
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
13 changed files with 195 additions and 105 deletions

View file

@ -1,4 +1,4 @@
import { defineCollection, reference, z } from 'astro:content'
import { defineCollection, z } from 'astro:content'
const blog = defineCollection({
type: 'content',
@ -8,9 +8,8 @@ const blog = defineCollection({
date: z.coerce.date(),
draft: z.boolean().optional(),
image: z.string().optional(),
tags: z.array(z.string()).optional(),
author: z.union([reference('authors'), z.string()]).optional(),
author: z.array(z.string()).optional(),
}),
})