-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeystatic.config.ts
38 lines (37 loc) · 950 Bytes
/
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
// keystatic.config.ts
import { collection, config, fields } from "@keystatic/core"
export default config({
storage: {
kind: "local",
},
// storage: {
// kind: "github",
// repo: {
// owner: "frankievalentine",
// name: "v3frankie.me",
// },
// },
collections: {
posts: collection({
label: "Posts",
slugField: "title",
path: "src/content/posts/*",
format: { contentField: "content" },
schema: {
title: fields.slug({ name: { label: "Title" } }),
description: fields.ignored(),
date: fields.date({ label: "Published Date" }),
content: fields.mdx({
label: "Content",
options: {
// Use Astro Image component for uploaded images
image: {
directory: "src/assets/images/posts",
publicPath: "@assets/images/posts/",
},
},
}),
},
}),
},
})