style: format

This commit is contained in:
Oliver Davies 2023-04-09 21:11:36 +01:00
parent 61d329e87c
commit 2185aa2620

View file

@ -1,4 +1,4 @@
import { defineCollection, z } from 'astro:content'; import { defineCollection, z } from "astro:content";
const blogCollection = defineCollection({ const blogCollection = defineCollection({
schema: z.object({ schema: z.object({
@ -23,27 +23,34 @@ const dailyEmailCollection = defineCollection({
const talkCollection = defineCollection({ const talkCollection = defineCollection({
schema: z.object({ schema: z.object({
description: z.string(), description: z.string(),
events: z.array(z.object({ events: z.array(
z.object({
date: z.string(), date: z.string(),
location: z.string().optional(), location: z.string().optional(),
name: z.string(), name: z.string(),
online: z.boolean().optional(), online: z.boolean().optional(),
})), })
speakerdeck: z.object({ ),
speakerdeck: z
.object({
id: z.string(), id: z.string(),
ratio: z.string(), ratio: z.string(),
url: z.string(), url: z.string(),
}).optional(), })
.optional(),
title: z.string(), title: z.string(),
video: z.object({ video: z
.object({
id: z.string(), id: z.string(),
type: z.enum(['vimeo', 'youtube']), type: z.enum(["vimeo", "youtube"]),
}).or(z.null()).optional(), })
.or(z.null())
.optional(),
}), }),
}); });
export const collections = { export const collections = {
'daily-email': dailyEmailCollection, "daily-email": dailyEmailCollection,
blog: blogCollection, blog: blogCollection,
talk: talkCollection, talk: talkCollection,
}; };