mernmail-website/sanity.config.js

32 lines
943 B
JavaScript
Raw Normal View History

2024-11-08 09:43:04 +01:00
"use client";
/**
* This configuration is used to for the Sanity Studio thats mounted on the `/app/studio/[[...tool]]/page.jsx` route
*/
import { visionTool } from "@sanity/vision";
import { defineConfig } from "sanity";
import { structureTool } from "sanity/structure";
import { codeInput } from "@sanity/code-input";
// Go to https://www.sanity.io/docs/api-versioning to learn how API versioning works
import { apiVersion, dataset, projectId } from "./sanity/env";
import { schemaTypes } from "./sanity/schemaTypes";
export default defineConfig({
basePath: "/studio",
projectId,
dataset,
// Add and edit the content schema in the './sanity/schemaTypes' folder
schema: {
types: schemaTypes
},
plugins: [
structureTool(),
// Vision is for querying with GROQ from inside the Studio
// https://www.sanity.io/docs/the-vision-plugin
visionTool({ defaultApiVersion: apiVersion }),
codeInput()
]
});