-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsanity.config.ts
49 lines (46 loc) · 1.24 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
import { defineConfig, isDev, type PluginOptions } from "sanity";
import { visionTool } from "@sanity/vision";
import { deskTool } from "sanity/desk";
import { schemaTypes, pageTypes } from "./schemas";
import { scheduledPublishing } from "@sanity/scheduled-publishing";
import Iframe from "sanity-plugin-iframe-pane";
import { CogIcon, RocketIcon } from "@sanity/icons";
const devOnlyPlugins = [Iframe];
interface Config {
name: string;
title: string;
basePath: string;
projectId: string;
dataset: string;
icon?: any;
plugins: Array<PluginOptions>;
schema: Object;
}
const configArray: Config[] = [
{
name: "Knaufland",
title: "Kaufland-CMS",
basePath: "/studio",
projectId: "u678c0qn",
dataset: "production",
icon: RocketIcon,
plugins: [
deskTool(),
scheduledPublishing(),
visionTool(),
...(isDev ? devOnlyPlugins : []),
],
schema: { types: pageTypes },
},
{
name: "my-staging-space",
title: "My staging workspace",
basePath: "/staging",
projectId: "u678c0qn",
dataset: "staging",
icon: CogIcon,
plugins: [deskTool(), visionTool(), ...(isDev ? devOnlyPlugins : [])],
schema: { types: schemaTypes },
},
];
export default defineConfig(configArray);