-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcontent.config.ts
More file actions
72 lines (67 loc) · 1.92 KB
/
content.config.ts
File metadata and controls
72 lines (67 loc) · 1.92 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
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
export default defineContentConfig({
collections: {
// Documentation documents
docs: defineCollection({
type: 'page',
source: 'docs/**/*.md',
schema: z.object({
title: z.string(),
description: z.string().optional(),
category: z.string().default('uncategorized'),
order: z.number().optional(),
unlisted: z.boolean().optional().default(false),
}),
}),
// Guide articles
guides: defineCollection({
type: 'page',
source: 'guides/**/*.md',
schema: z.object({
title: z.string(),
description: z.string().optional(),
author: z.string().default('Blueprint'),
category: z.string().default('uncategorized'),
thumbnail: z.string().optional(),
order: z.number().optional(),
unlisted: z.boolean().optional().default(false),
}),
}),
// Legal documents
legal: defineCollection({
type: 'page',
source: 'legal/*.md',
schema: z.object({
title: z.string(),
updated: z.string(),
}),
}),
// Releases
releases: defineCollection({
type: 'page',
source: 'releases/*.md',
schema: z.object({
version: z.string(),
released: z.string(),
summary: z.string().optional(),
supported: z.boolean().optional().default(false),
latest: z.boolean().optional().default(false),
num: z.number(),
}),
}),
// Blog posts
blog: defineCollection({
type: 'page',
source: 'blog/*.md',
schema: z.object({
title: z.string(),
description: z.string().optional(),
author: z.string().default('Blueprint'),
thumbnail: z.string().optional(),
date: z.string(),
num: z.number(),
unlisted: z.boolean().optional().default(false),
}),
}),
},
})