2022-12-22 19:20:36 +01:00
|
|
|
import { defineConfig } from 'sanity'
|
|
|
|
import { deskTool } from 'sanity/desk'
|
|
|
|
import { visionTool } from '@sanity/vision'
|
|
|
|
import { markdownSchema } from 'sanity-plugin-markdown'
|
|
|
|
import { schemaTypes } from './schemas'
|
2023-06-17 10:51:25 +02:00
|
|
|
import { capitalize } from '../shared/utils.mjs'
|
2022-12-22 19:20:36 +01:00
|
|
|
|
2023-06-17 10:51:25 +02:00
|
|
|
export default defineConfig(
|
|
|
|
['site-content', 'user-content'].map((dataset) => ({
|
|
|
|
name: dataset,
|
|
|
|
title: `FreeSewing ${dataset
|
|
|
|
.split('-')
|
|
|
|
.map((word) => capitalize(word))
|
|
|
|
.join(' ')}`,
|
|
|
|
projectId: 'hl5bw8cj',
|
|
|
|
dataset,
|
|
|
|
basePath: `/${dataset}`,
|
|
|
|
plugins: [deskTool(), visionTool(), markdownSchema()],
|
|
|
|
schema: { types: schemaTypes },
|
|
|
|
}))
|
|
|
|
)
|