-
Notifications
You must be signed in to change notification settings - Fork 0
/
keystatic.config.ts
56 lines (55 loc) · 1.7 KB
/
keystatic.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
51
52
53
54
55
56
import { config, fields, collection } from "@keystatic/core";
export default config({
storage: {
kind: "local",
},
collections: {
projects: collection({
label: "Projects",
slugField: "title",
path: "src/content/projects/*",
format: { contentField: "content" },
entryLayout: "content",
schema: {
title: fields.slug({ name: { label: "Title" } }),
type: fields.select({
label: "Type",
options: [
{ label: "Production", value: "production" },
{ label: "Demo", value: "demo" },
],
defaultValue: "demo",
}),
url: fields.url({ label: "URL" }),
repoUrl: fields.url({
label: "Repo URL",
description:
"Fill this only for pulic repos, where it makes sense to share.",
}),
summary: fields.text({
label: "Summary",
multiline: true,
description: "This will be used on the homepage listing.",
}),
coverImage: fields.image({
label: "Cover image",
validation: { isRequired: true },
directory: "src/assets/projects",
publicPath: "../../assets/projects",
}),
sortIndex: fields.integer({ label: "Sort Index", defaultValue: 100 }),
content: fields.document({
label: "Content",
description:
"The long form copy for the project page. A link to a dedicated page will be available if this field is filled.",
formatting: true,
links: true,
images: {
directory: "src/assets/projects",
publicPath: "../../assets/projects",
},
}),
},
}),
},
});