-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathcontent.config.ts
43 lines (42 loc) · 1.21 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
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
import { CollectionNames } from './content.config.names'
export default defineContentConfig({
collections: {
[CollectionNames.docs]: defineCollection({
type: 'page',
source: 'docs/**/*.md',
schema: z.object({
title: z.string(),
icon: z.string(),
release: z.string().optional(),
version: z.string().optional(),
editions: z.array(z.enum(["OSS", "EE"])).optional(),
topics: z.array(z.string()).optional(),
stage: z.string().optional(),
hideSubMenus: z.boolean().optional(),
deprecated: z.object({
since: z.string(),
migrationGuide: z.string(),
}).optional(),
})
}),
[CollectionNames.blogs]: defineCollection({
type: 'page',
source: 'blogs/**/*.md',
schema: z.object({
date: z.date(),
category: z.string(),
author: z.object({
name: z.string(),
image: z.string(),
twitter: z.string(),
}),
image: z.string(),
})
}),
[CollectionNames.misc]: defineCollection({
type: 'page',
source: '*.md',
}),
}
})