-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsanity.config.ts
More file actions
51 lines (45 loc) · 1.37 KB
/
sanity.config.ts
File metadata and controls
51 lines (45 loc) · 1.37 KB
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
"use client";
/**
* This configuration is used to for the Sanity Studio that's mounted on the `/app/studio/[[...tool]]/page.tsx` route
*/
import { RocketIcon } from "@sanity/icons";
import { visionTool } from "@sanity/vision";
import { defineConfig } from "sanity";
import { presentationTool } from "sanity/presentation";
import { structureTool } from "sanity/structure";
// Go to https://www.sanity.io/docs/api-versioning to learn how API versioning works
import { apiVersion, dataset, projectId } from "./sanity/env";
import { schema } from "./sanity/schemaTypes";
import { structure } from "./sanity/structure";
export default defineConfig({
basePath: "/studio",
projectId,
dataset,
title: "Portfolio Studio",
subtitle: "Content Management",
// Custom studio icon
icon: RocketIcon,
// Add and edit the content schema in the './sanity/schemaTypes' folder
schema,
plugins: [
structureTool({
structure,
title: "Content",
}),
presentationTool({
previewUrl: {
initial: process.env.SANITY_STUDIO_PREVIEW_ORIGIN,
preview: "/",
previewMode: {
enable: "/api/draft-mode/enable",
},
},
}),
// Vision is for querying with GROQ from inside the Studio
// https://www.sanity.io/docs/the-vision-plugin
visionTool({
defaultApiVersion: apiVersion,
title: "GROQ",
}),
],
});