adding sanity components
This commit is contained in:
25
schemas/objects/cta.ts
Normal file
25
schemas/objects/cta.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
|
||||
export const cta = defineType({
|
||||
name: 'cta',
|
||||
title: 'Call to Action',
|
||||
type: 'object',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'title',
|
||||
title: 'Title',
|
||||
type: 'string',
|
||||
validation: Rule => Rule.max(30).error('Keep this short')
|
||||
}),
|
||||
defineField({
|
||||
name: 'link',
|
||||
title: 'Link',
|
||||
type: 'reference',
|
||||
to: [
|
||||
{type: 'pages'},
|
||||
{type: 'projects'}
|
||||
],
|
||||
description: 'Keep your CTA to an internal page for SEO best practices'
|
||||
})
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user