personal-website/studio/sanity.config.ts

29 lines
740 B
TypeScript
Raw Normal View History

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
),
},
})