This commit is contained in:
2026-03-12 07:10:17 -04:00
parent f00a3934bc
commit 9ebf06a15a
4 changed files with 381 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
import {defineField, defineType} from 'sanity'
export default defineType({
name: 'author',
title: 'Author',
type: 'document',
fields: [
defineField({
name: 'name',
title: 'Name',
type: 'string',
validation: (Rule) => Rule.required(),
}),
defineField({
name: 'slug',
title: 'Slug',
type: 'slug',
options: {source: 'name'},
}),
defineField({
name: 'image',
title: 'Image',
type: 'image',
options: {hotspot: true},
}),
defineField({
name: 'bio',
title: 'Bio',
type: 'text',
rows: 3,
}),
],
preview: {
select: {title: 'name', media: 'image'},
},
})