This commit is contained in:
parent
2db950a59d
commit
0afe61add2
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { z, defineCollection } from 'astro:content'
|
import { z, defineCollection } from 'astro:content'
|
||||||
|
|
||||||
|
// Individual TA entries
|
||||||
const entry = z.object({
|
const entry = z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
link: z.string().url(),
|
link: z.string().url(),
|
||||||
|
@ -9,12 +10,14 @@ const entry = z.object({
|
||||||
runner: z.string(),
|
runner: z.string(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Individual quest info block
|
||||||
const quest = z.object({
|
const quest = z.object({
|
||||||
questTitle: z.string(),
|
questTitle: z.string(),
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
data: z.array(entry)
|
data: z.array(entry)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Basic info block for page
|
||||||
const info = z.object({
|
const info = z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
releaseDate: z.string().transform((str) => new Date(str)),
|
releaseDate: z.string().transform((str) => new Date(str)),
|
||||||
|
@ -22,6 +25,7 @@ const info = z.object({
|
||||||
releaseNumber: z.number().default(1),
|
releaseNumber: z.number().default(1),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Combined ta data collection schema
|
||||||
const taData = defineCollection({
|
const taData = defineCollection({
|
||||||
type: 'data',
|
type: 'data',
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
|
|
Loading…
Reference in a new issue