我正在开发一个 NextJS 项目。该项目的博客页面使用 Sanity 进行内容管理。我希望能够创建这样的块引号:
我查看了他们的文档以及 Sanity 工作室,但没有找到我需要的东西,感谢任何帮助。
您想创建一个包含图像和富文本的架构吗?
defineField({
name: 'carousel',
title: 'Carousel',
type: 'array',
of: [{type: 'carousel'}],
}),
然后
export default {
name: 'carousel',
title: 'Carousel*',
type: 'document',
validation: (Rule) => Rule.required(),
fields: [
defineField({
name: 'icon',
title: 'icon',
type: 'image',
}),
defineField({
name: 'text',
title: 'text',
type: 'array',
of: [{type: 'block'}],
}),
}
如果我明白你想要什么,这样的事情就会起作用。