29 lines
740 B
TypeScript
29 lines
740 B
TypeScript
import {defineConfig} from 'sanity'
|
|
import {deskTool} from 'sanity/desk'
|
|
import {media} from 'sanity-plugin-media'
|
|
import {visionTool} from '@sanity/vision'
|
|
import {schemaTypes} from './schemas'
|
|
import {blogPostPublishAction} from './documentActions/blogPostPublishAction'
|
|
|
|
export default defineConfig({
|
|
name: 'personal-webiste',
|
|
title: 'Personal website',
|
|
|
|
projectId: 'tzamgyrm',
|
|
dataset: 'production',
|
|
|
|
plugins: [deskTool(), visionTool(), media()],
|
|
|
|
schema: {
|
|
types: schemaTypes,
|
|
},
|
|
|
|
document: {
|
|
// @ts-expect-error
|
|
actions: (originalActions) =>
|
|
originalActions.map((originalAction) =>
|
|
originalAction.action === 'publish' ? blogPostPublishAction(originalAction) : originalAction
|
|
),
|
|
},
|
|
})
|