-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathcontent.config.ts
More file actions
68 lines (65 loc) · 1.49 KB
/
content.config.ts
File metadata and controls
68 lines (65 loc) · 1.49 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
import { defineCollection, defineContentConfig, z } from "@nuxt/content";
const maintainerSchema = z.object({
username: z.string(),
full_name: z.string(),
photo: z.string(),
designation: z.string(),
socials: z.array(
z.object({
label: z.string(),
link: z.string(),
})
),
projects: z.array(
z.object({
name: z.string(),
project_link: z.string(),
website_link: z.string(),
logo: z.string(),
description: z.string(),
short_description: z.string(),
})
),
form: z.array(
z.object({
question: z.string(),
response: z.string(),
})
),
projects_list: z.string(),
created_on: z.string(),
});
const planetSchema = z.object({
maintainerName: z.string(),
maintainerUsername: z.string(),
feedUrl: z.string().optional(),
lastFetched: z.string().optional(),
posts: z.array(
z.object({
slug: z.string(),
guid: z.string().optional(),
title: z.string(),
link: z.string(),
pubDate: z.string(),
content: z.string(),
contentSnippet: z.string(),
image: z.string().optional(),
author: z.string().optional(),
tags: z.array(z.string()),
})
),
});
export default defineContentConfig({
collections: {
maintainers: defineCollection({
type: "page",
source: "maintainers/**.json",
schema: maintainerSchema,
}),
planet: defineCollection({
type: "page",
source: "planet/**.json",
schema: planetSchema,
}),
},
});