-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvelite.config.ts
More file actions
100 lines (99 loc) · 2.79 KB
/
velite.config.ts
File metadata and controls
100 lines (99 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import { defineConfig, s } from "velite";
// biome-ignore lint/style/noDefaultExport: Config file
export default defineConfig({
collections: {
clients: {
name: "Clients",
pattern: "clients/**/meta.json",
schema: s.object({
slug: s.slug(),
name: s.string(),
description: s.string(),
href: s.string().optional(),
avatar: s.image().optional(),
banner: s.image().optional(),
start: s.string().optional(),
end: s.string().optional(),
hidden: s.boolean().optional().default(false),
projects: s
.array(
s.object({
name: s.string(),
description: s.string(),
avatar: s.image().optional(),
links: s
.array(
s.object({
name: s.string(),
href: s.string(),
icon: s.string().optional(),
})
)
.optional(),
media: s
.array(
s.intersection(
s.discriminatedUnion("type", [
s.object({
type: s.literal("image"),
image: s.image(),
}),
s.object({
type: s.literal("video"),
video: s.file(),
}),
s.object({
type: s.literal("embed"),
url: s.string(),
}),
]),
s.object({
caption: s.string().optional(),
})
)
)
.optional(),
})
)
.optional(),
testimonials: s
.array(
s.object({
name: s.string(),
role: s.string(),
testimonial: s.string(),
url: s.string().optional(),
avatar: s.image().optional(),
})
)
.optional(),
}),
},
artists: {
name: "Artists",
pattern: "commissions/**/meta.json",
schema: s.object({
slug: s.slug(),
name: s.string(),
link: s.string().optional(),
avatar: s.image().optional(),
commissions: s.array(
s.object({
slug: s.string(),
title: s.string(),
description: s.string().optional(),
images: s.array(s.image()),
links: s
.array(
s.object({
text: s.string(),
href: s.string(),
})
)
.optional(),
})
),
}),
},
},
});