-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsanity.config.ts
81 lines (74 loc) · 2.06 KB
/
sanity.config.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* This configuration is used to for the Sanity Studio that’s mounted on the `/app/studio/[[...index]]/page.tsx` route
*/
import { structureTool } from 'sanity/structure'
// Go to https://www.sanity.io/docs/api-versioning to learn how API versioning works
import { apiVersion, configStudioBasePath, configStudioName, configStudioTitle, dataset, projectId } from '@sanity/lib/api'
import { structure, schemaOptions, documentOptions } from '@/sanity/structure'
import { PluginOptions, StudioToolMenu, defineConfig } from 'sanity'
import { media } from 'sanity-plugin-media'
import { iconify } from 'sanity-plugin-iconify';
import { vercelDeployTool } from 'sanity-plugin-vercel-deploy'
import { pages } from "@tinloof/sanity-studio";
import { AdjustmentsHorizontalIcon, DocumentTextIcon, ArchiveBoxIcon, TableCellsIcon } from '@heroicons/react/24/solid'
import { presentationTool } from 'sanity/presentation'
import { resolve } from '@/sanity/lib/resolve'
const deskPlugins = [
presentationTool({
resolve,
previewUrl: {
previewMode: {
enable: '/api/preview',
},
},
}),
// pages({
// // Presentation's configuration
// previewUrl: {
// previewMode: {
// enable: "/api/preview",
// },
// },
// creatablePages: ["page", "archive"],
// folders: {
// "/archives": {
// title: "Archives",
// icon: ArchiveBoxIcon,
// },
// "": {
// title: "Pages",
// icon: DocumentTextIcon,
// },
// },
// }),
structureTool({
name: 'data',
title: 'Data',
icon: TableCellsIcon,
structure,
}),
media(),
iconify({
showName: false,
collections: ['heroicons']
}),
vercelDeployTool(),
] as PluginOptions[]
const config = defineConfig({
icon: AdjustmentsHorizontalIcon,
basePath: configStudioBasePath,
name: configStudioName,
title: configStudioTitle,
projectId,
dataset,
schema: schemaOptions,
plugins: deskPlugins,
document: documentOptions,
scheduledPublishing: {
enabled: false,
},
tasks: {
enabled: false
},
})
export default config;