-
Notifications
You must be signed in to change notification settings - Fork 9
/
sanity.config.js
49 lines (45 loc) · 1.68 KB
/
sanity.config.js
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
/**
* This configuration is used to for the Sanity Studio that’s mounted on the `\app\sanity\[[...index]]\page.jsx` route
*/
import { visionTool } from "@sanity/vision";
import { defineConfig } from "sanity";
import { schemaTypes } from "./sanity/schemas";
import { structureTool } from "sanity/structure";
import { orderableDocumentListDeskItem } from "@sanity/orderable-document-list";
const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID;
const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET;
const apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION || '2023-05-03'
export default defineConfig({
basePath: "/studio",
projectId: projectId,
dataset: dataset,
schema: {
types: schemaTypes,
},
plugins: [
structureTool({
structure: (S, context) => {
return S.list()
.title("Content")
.items([
// Minimum required configuration
// S.documentTypeListItem("event"),
S.documentTypeListItem("page"),
orderableDocumentListDeskItem({
type: "workGroup",
title: "Work groups",
S,
context,
}),
S.documentTypeListItem("boardPosition"),
orderableDocumentListDeskItem({ type: "hovedstyret", title: "Members of HS", S, context }),
orderableDocumentListDeskItem({ type: "kjellerstyret", title: "Members of KS", S, context }),
// S.documentTypeListItem("interngruppe"),
]);
},
}),
// Vision is a tool that lets you query your content with GROQ in the studio
// https://www.sanity.io/docs/the-vision-plugin
visionTool({ defaultApiVersion: apiVersion }),
],
});