-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanity.config.ts
44 lines (40 loc) · 1.21 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
/**
* This configuration is used to for the Sanity Studio that’s mounted on the `/app/studio/[[...index]]/page.tsx` route
*/
import { visionTool } from "@sanity/vision";
import { defineConfig, type Config } from "sanity";
import { structureTool } from "sanity/structure";
import { codeInput } from "@sanity/code-input";
import { colorInput } from "@sanity/color-input";
import { iconify } from "sanity-plugin-iconify";
import { structure } from "./sanity/desk/structure";
import { apiVersion, dataset, projectId } from "./sanity/env";
import { schema } from "./sanity/schema";
import { presentationTool } from "sanity/presentation";
import { media } from "sanity-plugin-media";
export const configBase = {
projectId,
schema,
plugins: [
structureTool({
structure,
}),
visionTool({ defaultApiVersion: apiVersion }),
presentationTool({
previewUrl: {
draftMode: {
enable: "/api/sanity/draft",
},
},
}),
codeInput(),
colorInput(),
iconify(),
media(),
],
} satisfies Partial<Config>;
// Note: This is only used for CLI commands. It isn't configured with the intent of being used in the app.
export default defineConfig({
...configBase,
dataset,
});