-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeystatic.config.ts
More file actions
95 lines (94 loc) · 2.88 KB
/
keystatic.config.ts
File metadata and controls
95 lines (94 loc) · 2.88 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import { config, fields, collection } from '@keystatic/core';
import { block } from '@keystatic/core/content-components';
export default config({
storage: {
kind: 'github',
repo: 'filippodanesi/serp-secrets.com',
},
collections: {
posts: collection({
label: 'Blog Posts',
slugField: 'title',
path: 'content/posts/*',
format: { contentField: 'content' },
schema: {
title: fields.slug({ name: { label: 'Title' } }),
date: fields.date({
label: 'Date',
validation: { isRequired: true },
}),
description: fields.text({
label: 'Description',
multiline: true,
validation: { isRequired: true },
}),
tags: fields.multiselect({
label: 'Tags',
options: [
{ label: 'Artificial Intelligence', value: 'Artificial Intelligence' },
{ label: 'SEO News', value: 'SEO News' },
{ label: 'SEO Strategies', value: 'SEO Strategies' },
{ label: 'Technical SEO', value: 'Technical SEO' },
],
}),
image: fields.image({
label: 'Featured Image',
directory: 'public/images/posts',
publicPath: '/images/posts/',
}),
draft: fields.checkbox({
label: 'Draft',
defaultValue: false,
}),
summary: fields.text({
label: 'AI Summary (auto-generated)',
description: 'Auto-generated summary for AEO. Leave empty to generate on build.',
multiline: true,
}),
content: fields.mdx({
label: 'Content',
options: {
image: {
directory: 'public/images/content',
publicPath: '/images/content/',
},
},
components: {
Figure: block({
label: 'Figure',
schema: {
image: fields.image({
label: 'Image',
directory: 'public/images/content',
publicPath: '/images/content/',
validation: { isRequired: true },
}),
alt: fields.text({
label: 'Alt Text',
description: 'Descriptive text for accessibility (not displayed)',
validation: { isRequired: true },
}),
caption: fields.text({
label: 'Caption',
description: 'Optional caption displayed below the image',
}),
},
}),
},
}),
},
}),
pages: collection({
label: 'Pages',
slugField: 'title',
path: 'content/pages/*',
format: { contentField: 'content' },
schema: {
title: fields.slug({ name: { label: 'Title' } }),
content: fields.mdx({
label: 'Content',
}),
},
}),
},
});