forked from nuotsu/sanitypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.ts
57 lines (56 loc) · 1.11 KB
/
site.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
57
import { defineField, defineType } from 'sanity'
export default defineType({
name: 'site',
title: 'Site',
type: 'document',
fieldsets: [
{ name: 'navigation', title: 'Navigation', options: { columns: 2 } },
],
fields: [
defineField({
name: 'companyName',
type: 'string',
}),
defineField({
name: 'logo',
description: '',
type: 'image',
}),
defineField({
name: 'footerLogo',
description: '',
type: 'image',
}),
defineField({
name: 'ctas',
title: 'Call-to-actions',
type: 'array',
of: [{ type: 'cta' }],
validation: (Rule) => Rule.max(2),
}),
defineField({
name: 'headerMenu',
type: 'reference',
to: [{ type: 'navigation' }],
fieldset: 'navigation',
}),
defineField({
name: 'footerMenu',
type: 'reference',
to: [{ type: 'navigation' }],
fieldset: 'navigation',
}),
defineField({
name: 'social',
type: 'reference',
to: [{ type: 'navigation' }],
fieldset: 'navigation',
}),
defineField({
name: 'ogimage',
title: 'Open Graph Image (global)',
description: 'Used for social sharing previews',
type: 'image',
}),
],
})