Comments
All checks were successful
/ checking (push) Successful in 29s

This commit is contained in:
Firq 2024-01-25 21:23:21 +01:00
parent 2db950a59d
commit 0afe61add2
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -1,5 +1,6 @@
import { z, defineCollection } from 'astro:content'
// Individual TA entries
const entry = z.object({
title: z.string(),
link: z.string().url(),
@ -9,12 +10,14 @@ const entry = z.object({
runner: z.string(),
})
// Individual quest info block
const quest = z.object({
questTitle: z.string(),
description: z.string(),
data: z.array(entry)
})
// Basic info block for page
const info = z.object({
title: z.string(),
releaseDate: z.string().transform((str) => new Date(str)),
@ -22,6 +25,7 @@ const info = z.object({
releaseNumber: z.number().default(1),
})
// Combined ta data collection schema
const taData = defineCollection({
type: 'data',
schema: z.object({