-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.config.ts
More file actions
44 lines (42 loc) · 1.07 KB
/
content.config.ts
File metadata and controls
44 lines (42 loc) · 1.07 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
import { defineContentConfig, defineCollection } from '@nuxt/content'
import { z } from 'zod'
import { asSeoCollection } from '@nuxtjs/seo/content';
const pageSchema = z.object({
title: z.string().min(1),
description: z.string().optional(),
startBehindNav: z.boolean().optional().default(false),
date: z.string().datetime().optional(),
authors: z.array(z.object({
name: z.string().nonempty(),
})).optional(),
badge: z.string().optional(),
image: z.string().optional(),
});
export default defineContentConfig({
collections: {
content_en: defineCollection(asSeoCollection({
type: 'page',
source: {
include: 'en/**',
prefix: '/',
},
schema: pageSchema,
})),
content_de: defineCollection(asSeoCollection({
type: 'page',
source: {
include: 'de/**',
prefix: '/',
},
schema: pageSchema,
})),
content_fr: defineCollection(asSeoCollection({
type: 'page',
source: {
include: 'fr/**',
prefix: '/',
},
schema: pageSchema,
})),
},
})