-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsanity.config.ts
74 lines (71 loc) · 1.89 KB
/
sanity.config.ts
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import { documentInternationalization } from '@sanity/document-internationalization'
import { RobotIcon, RocketIcon } from '@sanity/icons'
import { visionTool } from '@sanity/vision'
import { createAuthStore, defineConfig } from 'sanity'
import { structureTool } from 'sanity/structure'
import { schemaTypes } from './schemaTypes'
import { supportedLanguages } from './schemaTypes/supportedLanguages'
export const projectId = 'g2by7q6m'
const pluginsArray = [
structureTool(),
visionTool(),
documentInternationalization({
supportedLanguages,
schemaTypes: ['readmore', 'forbeholdAvsnitt', 'guidepanel'],
languageField: 'language',
}),
]
export default defineConfig([
{
projectId,
dataset: 'development',
name: 'pensjonskalkulator-frontend-development-workspace',
basePath: '/development',
title: 'Development Workspace',
subtitle: 'development',
icon: RobotIcon,
plugins: [...pluginsArray],
schema: {
types: schemaTypes,
},
auth: createAuthStore({
projectId,
dataset: 'development',
mode: 'append',
redirectOnSingle: true,
providers: [
{
name: 'saml',
title: 'NAV SSO',
url: 'https://api.sanity.io/v2021-10-01/auth/saml/login/f3270b37',
},
],
}),
},
{
projectId,
dataset: 'production',
name: 'pensjonskalkulator-frontend-production-workspace',
basePath: '/production',
title: 'Production Workspace',
subtitle: 'production',
icon: RocketIcon,
plugins: [...pluginsArray],
schema: {
types: schemaTypes,
},
auth: createAuthStore({
projectId,
dataset: 'production',
mode: 'append',
redirectOnSingle: true,
providers: [
{
name: 'saml',
title: 'NAV SSO',
url: 'https://api.sanity.io/v2021-10-01/auth/saml/login/f3270b37',
},
],
}),
},
])