-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsanity.config.ts
More file actions
28 lines (25 loc) · 901 Bytes
/
sanity.config.ts
File metadata and controls
28 lines (25 loc) · 901 Bytes
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
// Different environments use different variables
const projectId = import.meta.env.PUBLIC_SANITY_PROJECT_ID
const dataset = import.meta.env.PUBLIC_SANITY_DATASET
// Feel free to remove this check if you don't need it
if (!projectId || !dataset) {
throw new Error(
`Missing environment variable(s). Check if named correctly in .env file.\n\nShould be:\nPUBLIC_SANITY_STUDIO_PROJECT_ID=${projectId}\nPUBLIC_SANITY_STUDIO_DATASET=${dataset}\n\nAvailable environment variables:\n${JSON.stringify(
import.meta.env,
null,
2
)}`
)
}
import { defineConfig } from 'sanity'
import { structureTool } from 'sanity/structure'
import { visionTool } from '@sanity/vision'
import { schema } from './schema'
export default defineConfig({
name: 'emanuelsaramago',
title: 'Emanuel Saramago Portfolio',
projectId,
dataset,
plugins: [structureTool(), visionTool()],
schema,
})