personal-website/studio/sanity.config.ts
Filipe Medeiros c072a4b30e
feat: unsplash and small fix to types
Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
2023-12-03 12:26:05 +01:00

29 lines
809 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'
import {unsplashImageAsset} from 'sanity-plugin-asset-source-unsplash'
export default defineConfig({
name: 'personal-webiste',
title: 'Personal website',
projectId: 'tzamgyrm',
dataset: 'production',
plugins: [deskTool(), visionTool(), media(), unsplashImageAsset()],
schema: {
types: schemaTypes,
},
document: {
actions: (originalActions) =>
originalActions.map((originalAction) =>
originalAction.action === 'publish' ? blogPostPublishAction(originalAction) : originalAction
),
},
})