-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkeystatic.config.ts
More file actions
34 lines (32 loc) · 1.12 KB
/
keystatic.config.ts
File metadata and controls
34 lines (32 loc) · 1.12 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
import { config, fields, collection } from '@keystatic/core';
const postSchema = {
title: fields.slug({ name: { label: 'Title / Заголовок' } }),
description: fields.text({ label: 'Description / Описание', multiline: true }),
publishedAt: fields.date({
label: 'Published at / Дата',
defaultValue: { kind: 'today' },
}),
author: fields.text({ label: 'Author / Автор', defaultValue: 'NurOS Team' }),
tags: fields.array(fields.text({ label: 'Tag' }), { label: 'Tags / Теги' }),
content: fields.markdoc({ label: 'Content / Содержание' }),
};
export default config({
storage: { kind: 'local' },
ui: { brand: { name: 'NurOS CMS' } },
collections: {
postsEn: collection({
label: '📝 Posts — English',
slugField: 'title',
path: 'src/content/posts-en/*',
format: { contentField: 'content' },
schema: postSchema,
}),
postsRu: collection({
label: '📝 Посты — Русский',
slugField: 'title',
path: 'src/content/posts-ru/*',
format: { contentField: 'content' },
schema: postSchema,
}),
},
});