-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcontent.config.ts
50 lines (49 loc) · 1.23 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
import { defineCollection, z } from '@nuxt/content'
import { asSeoCollection } from '@nuxtjs/seo/content'
export const collections = {
content: defineCollection(
asSeoCollection({
type: 'page',
source: [
{
include: '**/*.md',
prefix: '/'
},
{
repository: 'https://github.com/HugoRCD/notes',
include: '*.md',
prefix: '/notes',
authToken: process.env.NUXT_PRIVATE_GITHUB_TOKEN,
}
],
schema: z.object({
title: z.string().nonempty(),
description: z.string().nonempty(),
date: z.string().nonempty(),
})
})
),
writing: defineCollection(
asSeoCollection({
type: 'page',
source: '2.writing/*.md',
schema: z.object({
title: z.string().nonempty(),
description: z.string().nonempty(),
date: z.string().nonempty(),
})
})
),
works: defineCollection({
type: 'data',
source: '1.works/*.json',
schema: z.object({
name: z.string().nonempty(),
description: z.string().nonempty(),
category: z.string().nonempty(),
link: z.string().url(),
release: z.string().optional(),
date: z.string().nonempty(),
})
}),
}