-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.config.ts
49 lines (48 loc) · 1.22 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
import { defineCollection, z } from '@nuxt/content';
export const collections = {
content: defineCollection({
type: 'page',
source: {
include: '**/*.md',
exclude: ['**/-*.md', 'book/**/*.md'],
prefix: '/post',
// cwd: process.env.CONTENT_FS_PATH,
repository: 'https://github.com/aatrooox/Blog',
authToken: process.env.CONTENT_REPO_TOKEN
},
schema: z.object({
date: z.date(),
lastmod: z.date(),
tags: z.array(z.string()),
versions: z.array(z.string()),
rawbody: z.string()
})
}),
book: defineCollection({
type: 'page',
source: {
include: 'book/**/*.md',
exclude: ['book/**/-*.md'],
// prefix: '/post',
// cwd: process.env.CONTENT_FS_PATH,
repository: 'https://github.com/aatrooox/Blog',
authToken: process.env.CONTENT_REPO_TOKEN
},
schema: z.object({
date: z.date(),
lastmod: z.date(),
tags: z.array(z.string()),
versions: z.array(z.string()),
})
}),
bookConfig: defineCollection({
type: 'data',
source: 'bookConfig/**.json',
schema: z.object({
name: z.string(),
description: z.string(),
cover: z.string(),
status: z.string()
})
})
}