Skip to content

Commit b5b1e54

Browse files
committed
docs: add support for Nuxt Studio form customisation
1 parent f59c078 commit b5b1e54

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/content.config.ts

+19-19
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Testimonial = z.object({
3131
const PageFeature = z.object({
3232
title: z.string(),
3333
description: z.string(),
34-
icon: z.string(),
34+
icon: z.string().editor({ input: 'icon' }),
3535
to: z.string().optional(),
3636
target: z.enum(['_blank', '_self']).optional(),
3737
soon: z.boolean().optional()
@@ -43,26 +43,26 @@ const PageSection = z.object({
4343
links: z.array(Button),
4444
features: z.array(PageFeature),
4545
image: z.object({
46-
light: z.string(),
47-
dark: z.string(),
48-
width: z.number(),
49-
height: z.number()
46+
light: z.string().editor({ input: 'media' }),
47+
dark: z.string().editor({ input: 'media' }),
48+
width: z.number().optional(),
49+
height: z.number().optional()
5050
})
5151
})
5252

5353
const PageHero = z.object({
5454
title: z.string(),
5555
description: z.string(),
5656
image: z.object({
57-
width: z.string().optional(),
58-
height: z.string().optional(),
59-
light: z.string(),
60-
dark: z.string()
57+
width: z.number().optional(),
58+
height: z.number().optional(),
59+
light: z.string().editor({ input: 'media' }),
60+
dark: z.string().editor({ input: 'media' })
6161
}).optional(),
6262
headline: z.object({
6363
label: z.string(),
6464
to: z.string(),
65-
icon: z.string().optional()
65+
icon: z.string().optional().editor({ input: 'icon' })
6666
}).optional(),
6767
links: z.array(Button).optional()
6868
})
@@ -85,10 +85,10 @@ export default defineContentConfig({
8585
title: z.string(),
8686
description: z.string(),
8787
image: z.object({
88-
light: z.string(),
89-
dark: z.string(),
90-
width: z.number(),
91-
height: z.number()
88+
light: z.string().editor({ input: 'media' }),
89+
dark: z.string().editor({ input: 'media' }),
90+
width: z.number().optional(),
91+
height: z.number().optional()
9292
})
9393
}))
9494
}),
@@ -110,7 +110,7 @@ export default defineContentConfig({
110110
type: 'page',
111111
source: 'changelog/*.md',
112112
schema: z.object({
113-
image: z.string(),
113+
image: z.string().editor({ input: 'media' }),
114114
authors: z.array(Author),
115115
date: z.string().date()
116116
})
@@ -119,7 +119,7 @@ export default defineContentConfig({
119119
type: 'page',
120120
source: 'blog/**/*.md',
121121
schema: z.object({
122-
image: z.string(),
122+
image: z.string().editor({ input: 'media' }),
123123
authors: z.array(Author),
124124
date: z.string().date(),
125125
category: z.enum(['Release', 'Tutorial'])
@@ -131,7 +131,7 @@ export default defineContentConfig({
131131
schema: z.object({
132132
title: z.string(),
133133
description: z.string(),
134-
icon: z.string(),
134+
icon: z.string().editor({ input: 'icon' }),
135135
hero: PageHero
136136
})
137137
}),
@@ -141,7 +141,7 @@ export default defineContentConfig({
141141
schema: z.object({
142142
title: z.string(),
143143
description: z.string(),
144-
icon: z.string(),
144+
icon: z.string().editor({ input: 'icon' }),
145145
hero: PageHero,
146146
pricing: z.object({
147147
plans: z.array(z.object({
@@ -191,7 +191,7 @@ export default defineContentConfig({
191191
schema: z.object({
192192
plans: z.array(z.object({
193193
label: z.string(),
194-
icon: z.string(),
194+
icon: z.string().editor({ input: 'icon' }),
195195
slot: z.string(),
196196
buttons: z.array(Button),
197197
columns: z.array(z.object({

0 commit comments

Comments
 (0)