-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.ts
48 lines (40 loc) · 1.04 KB
/
config.ts
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
import { defineCollection, z } from "astro:content";
const productFeatures = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
order: z.number(),
}),
});
const pricingSchema = z.object({
name: z.string(),
order: z.number(),
price: z.number(),
annualPrice: z.number().optional(),
priceLink: z.string(),
annualPriceLink: z.string().optional(),
discount: z.number().optional(),
disabled: z.boolean().optional().default(false),
linkTarget: z.string().optional(),
buttonText: z.string().optional(),
});
const roadmapSchema = z.object({
title: z.string(),
version: z.number(),
});
export type Roadmap = z.infer<typeof roadmapSchema>;
const roadmap = defineCollection({
type: "content",
schema: roadmapSchema,
});
export type PricingSchema = z.infer<typeof pricingSchema>;
const pricing = defineCollection({
type: "content",
schema: pricingSchema,
});
export const collections = {
"client-features": productFeatures,
"core-features": productFeatures,
pricing: pricing,
roadmap,
};