forked from open-sauced/landing-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanity.config.js
36 lines (33 loc) · 978 Bytes
/
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
// sanity.config.js
import { defineConfig } from "sanity";
import { structureTool } from 'sanity/structure'
import { visionTool } from '@sanity/vision'
import { markdownSchema } from "sanity-plugin-markdown";
import { generateOGImage } from '@catherineriver/sanity-plugin-generate-ogimage'
import { schemaTypes } from './sanity/schemas/schema'
import deskStructure from './sanity/deskStructure'
export default defineConfig({
title: "landing-page",
projectId: "r7m53vrk",
dataset: "production",
plugins: [
structureTool({
structure: deskStructure
}),
visionTool(),
markdownSchema(),
"@sanity/dashboard",
"dashboard-widget-document-list",
generateOGImage({})
],
tools: (prev) => {
// 👇 Uses environment variables set by Vite in development mode
if (process.env.NODE_ENV !== 'production') {
return prev
}
return prev.filter((tool) => tool.name !== 'vision')
},
schema: {
types: schemaTypes,
},
});