-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsanity.config.ts
More file actions
38 lines (34 loc) · 938 Bytes
/
sanity.config.ts
File metadata and controls
38 lines (34 loc) · 938 Bytes
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
import {visionTool} from '@sanity/vision'
import { defineConfig } from 'sanity'
import { structureTool } from 'sanity/structure'
import { schemaTypes } from './src/sanity/schemas'
import { structure } from './src/sanity/structure'
import { FiClock } from 'react-icons/fi'
import {apiVersion, dataset, projectId} from './src/sanity/env'
export default defineConfig({
name: 'default',
title: 'Multitime',
icon: FiClock,
projectId: projectId,
dataset: dataset,
basePath: '/studio',
plugins: [
structureTool({
structure,
}),
visionTool({defaultApiVersion: apiVersion}),
],
schema: {
types: schemaTypes,
},
document: {
// Customize document actions
actions: (prev, context) => {
// Remove delete action for critical documents
if (context.schemaType === 'appSettings') {
return prev.filter(({ action }) => action !== 'delete')
}
return prev
},
},
})