-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.config.ts
58 lines (56 loc) · 1.45 KB
/
content.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
49
50
51
52
53
54
55
56
57
58
import { defineCollection, defineContentConfig, z } from "@nuxt/content";
import { asRobotsCollection } from "@nuxtjs/robots/content";
export default defineContentConfig({
collections: {
content: defineCollection(
asRobotsCollection({
type: "page",
source: "**/*.md",
schema: z.object({
title: z.string(),
thumbnail: z.string(),
description: z.string(),
author: z.string(),
date: z.string(),
cat: z.string(),
tuts: z.string(),
rawbody: z.string(),
intro: z.boolean(),
comments: z.boolean(),
toc: z.boolean(),
}),
})
),
logs: defineCollection(
asRobotsCollection({
type: "page",
source: "**/logs/*.md",
schema: z.object({
title: z.string(),
thumbnail: z.string(),
description: z.string(),
author: z.string(),
date: z.string(),
cat: z.string(),
tuts: z.string(),
rawbody: z.string(),
intro: z.boolean(),
comments: z.boolean(),
toc: z.boolean(),
}),
})
),
cats: defineCollection(
asRobotsCollection({
type: "page",
source: "**/cats/*.md",
schema: z.object({
title: z.string(),
thumbnail: z.string(),
description: z.string(),
rawbody: z.string(),
}),
})
),
},
});