personal-website/studio/sanity.config.ts
Filipe Medeiros fbf6089cbc
fix: forgot this last time
Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
2023-12-03 12:26:02 +01:00

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