-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsanity.config.js
59 lines (54 loc) · 1.48 KB
/
sanity.config.js
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
import {defineConfig} from 'sanity'
import { structureTool } from 'sanity/structure'
import {StarIcon} from '@sanity/icons'
import {visionTool} from '@sanity/vision'
import { apiVersion, dataset, projectId } from '@/lib/sanity.api'
import {schemaTypes} from './schemas'
import {codeInput} from '@sanity/code-input'
import {cloudinarySchemaPlugin} from 'sanity-plugin-cloudinary'
import {orderableDocumentListDeskItem, orderRankField, orderRankOrdering} from '@sanity/orderable-document-list'
export default defineConfig({
basePath: '/studio',
name: 'default',
title: 'simonedenadai.com',
projectId,
dataset,
plugins: [
structureTool({
structure: (S, context) => {
return S.list()
.title('Content')
.items([
S.documentTypeListItem('post'),
orderableDocumentListDeskItem({
type: 'project',
title: 'Projects',
icon: StarIcon,
id: 'orderable-projects',
S,
context
}),
S.documentTypeListItem('author'),
S.documentTypeListItem('category'),
])
},
}),
visionTool({ defaultApiVersion: apiVersion }),
codeInput(),
cloudinarySchemaPlugin()
],
schema: {
types: [
...schemaTypes,
{
name: "ordered-project",
title: "Project",
type: "document",
orderings: [orderRankOrdering],
fields: [
orderRankField({ type: "project" }),
],
},
]
},
})