-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstackbit.config.ts
46 lines (45 loc) · 1.18 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
35
36
37
38
39
40
41
42
43
44
45
46
import { Model, defineStackbitConfig } from "@stackbit/types";
import { GitContentSource } from "@stackbit/cms-git";
import * as jsonModels from "./cms/models.json";
const config = defineStackbitConfig({
stackbitVersion: "~0.6.0",
ssgName: "nextjs",
nodeVersion: "18",
contentSources: [
new GitContentSource({
rootPath: __dirname,
contentDirs: ["content"],
models: (jsonModels.components as Model[]).concat({
name: "page",
type: "page",
label: "Page",
urlPath: "/{slug}",
filePath: "content/pages/{slug}.md",
fields: [
{ name: "title", type: "string", required: true },
{
type: "list",
name: "sections",
label: "Sections",
items: {
type: "model",
models: ["section"],
},
},
],
}),
assetsConfig: {
referenceType: "static",
staticDir: "public",
uploadDir: "images",
publicPath: "/",
},
}),
],
// presetSource: {
// type: "files",
// presetDirs: ["./.stackbit/presets"],
// },
styleObjectModelName: "ThemeStyle",
});
export default config;