generated from chrismwilliams/astro-tina
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keystatic.config.ts
36 lines (35 loc) · 1.01 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
import { collection, config, fields } from "@keystatic/core";
export default config({
collections: {
posts: collection({
format: { contentField: "content" },
label: "Posts",
path: "src/content/posts/*",
schema: {
content: fields.markdoc({
label: "Content",
options: { image: { directory: "src/assets" } },
}),
description: fields.text({
description: "SEO description of post",
label: "Description",
validation: { isRequired: true, length: { max: 160, min: 50 } },
}),
draft: fields.checkbox({
defaultValue: false,
description: "Set this post as draft to prevent it from being published",
label: "Draft",
}),
publishedDate: fields.date({ label: "Published Date", validation: { isRequired: true } }),
title: fields.slug({
name: { label: "Title", validation: { isRequired: true, length: { max: 60 } } },
}),
updatedDate: fields.date({ label: "Updated Date" }),
},
slugField: "title",
}),
},
storage: {
kind: "local",
},
});