-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsanity.config.js
More file actions
35 lines (31 loc) · 1.07 KB
/
Copy pathsanity.config.js
File metadata and controls
35 lines (31 loc) · 1.07 KB
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
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemaTypes'
import {languageFilter} from '@sanity/language-filter'
export default defineConfig({
name: 'default',
title: 'Site electroalfa',
projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID || '6sxnslmm',
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET || 'production',
plugins: [
structureTool(),
visionTool(),
languageFilter({
supportedLanguages: [
{id: 'ro', title: 'Română'},
{id: 'en', title: 'English'},
{id: 'de', title: 'Deutsch'},
{id: 'fr', title: 'Français'},
{id: 'it', title: 'Italiano'}
],
defaultLanguages: ['ro'],
documentTypes: ['product', 'newsArticle', 'investorDocument', 'historyMilestone', 'location'],
filterField: (enclosingType, member, selectedLanguageIds) =>
!enclosingType.name.startsWith('locale') || selectedLanguageIds.includes(member.name),
})
],
schema: {
types: schemaTypes,
},
})