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(
date: z.string(), z.object({
location: z.string().optional(), date: z.string(),
name: z.string(), location: z.string().optional(),
online: z.boolean().optional(), name: z.string(),
})), online: z.boolean().optional(),
speakerdeck: z.object({ })
id: z.string(), ),
ratio: z.string(), speakerdeck: z
url: z.string(), .object({
}).optional(), id: z.string(),
ratio: z.string(),
url: z.string(),
})
.optional(),
title: z.string(), title: z.string(),
video: z.object({ video: z
id: z.string(), .object({
type: z.enum(['vimeo', 'youtube']), id: z.string(),
}).or(z.null()).optional(), type: z.enum(["vimeo", "youtube"]),
})
.or(z.null())
.optional(),
}), }),
}); });
export const collections = { export const collections = {
'daily-email': dailyEmailCollection, "daily-email": dailyEmailCollection,
blog: blogCollection, blog: blogCollection,
talk: talkCollection, talk: talkCollection,
}; };