-
Notifications
You must be signed in to change notification settings - Fork 92
/
velite.config.ts
29 lines (27 loc) · 885 Bytes
/
velite.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
import { defineConfig, s } from 'velite'
// `s` is extended from Zod with some custom schemas,
// you can also import re-exported `z` from `velite` if you don't need these extension schemas.
export default defineConfig({
root: './src/content',
collections: {
changes: {
name: 'Change', // collection type name
pattern: 'changelog/**/*.md', // content files glob pattern
schema: s
.object({
title: s.string(),
date: s.isodate(), // input Date-like string, output ISO Date string.
content: s.markdown() // transform markdown to html
})
},
abouts: {
name: 'About', // collection type name
pattern: 'about/**/*.md', // content files glob pattern
schema: s
.object({
title: s.string(),
content: s.markdown() // transform markdown to html
})
},
}
})