-
Notifications
You must be signed in to change notification settings - Fork 233
/
stackbit.config.ts
34 lines (33 loc) · 1.12 KB
/
stackbit.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
// stackbit.config.ts
import { defineStackbitConfig } from '@stackbit/types';
import { GitContentSource } from '@stackbit/cms-git';
export default defineStackbitConfig({
stackbitVersion: '~0.6.0',
ssgName: 'nextjs',
nodeVersion: '18',
contentSources: [
new GitContentSource({
rootPath: __dirname,
contentDirs: ['posts'],
models: [
{
name: "Post",
type: "page",
urlPath: "/posts/{slug}",
filePath: "posts/{slug}.mdx",
fields: [
{ name: "title", type: "string", required: true, default: 'Post Title' },
{ name: "description", type: "string", default: 'Post description goes here' },
{ name: "date", type: "date", required: true },
]
}
],
assetsConfig: {
referenceType: 'static',
staticDir: 'public',
uploadDir: 'images',
publicPath: '/'
}
})
]
});