update content
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import { defineCollection, z, type ImageFunction } from 'astro:content'
|
||||
|
||||
export const socialMediaLinkSchema = z.object({
|
||||
icon: z.string(),
|
||||
export const linkSchema = z.object({
|
||||
title: z.string(),
|
||||
href: z.string(),
|
||||
target: z.string().optional(),
|
||||
})
|
||||
export const socialMediaLinkSchema = linkSchema.extend({
|
||||
title: z.string().optional(),
|
||||
icon: z.string(),
|
||||
})
|
||||
|
||||
export const heroSchema = (image: ImageFunction) =>
|
||||
z.object({
|
||||
@@ -12,13 +16,7 @@ export const heroSchema = (image: ImageFunction) =>
|
||||
description: z.string(),
|
||||
image: image(),
|
||||
imageAlt: z.string(),
|
||||
cta: z
|
||||
.object({
|
||||
title: z.string(),
|
||||
href: z.string(),
|
||||
target: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
cta: linkSchema.optional(),
|
||||
})
|
||||
|
||||
export const coaches = defineCollection({
|
||||
@@ -38,17 +36,14 @@ export const servicesSchema = z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
price: z.string().optional(),
|
||||
link: z.object({
|
||||
title: z.string(),
|
||||
href: z.string(),
|
||||
target: z.string().optional(),
|
||||
}),
|
||||
link: linkSchema.optional(),
|
||||
charachteristics: z
|
||||
.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
price: z.string().optional(),
|
||||
link: linkSchema.optional(),
|
||||
})
|
||||
)
|
||||
.optional(),
|
||||
|
||||
Reference in New Issue
Block a user