1
0
Fork 0
freesewing/sites/sanity/schemas/showcase.js
2022-10-21 22:05:12 +02:00

51 lines
871 B
JavaScript

export const showcaseSchemaBuilder = (lang) => ({
name: `showcase${lang}`,
type: 'document',
title: `Showcase ${lang.toUpperCase()}`,
fields: [
{
name: 'title',
type: 'string',
title: 'Title',
},
{
name: 'slug',
type: 'slug',
title: 'Slug',
options: {
source: 'title',
}
},
{
name: 'date',
type: 'date',
title: 'Date',
},
{
name: 'intro',
title: 'Intro',
type: 'text',
},
{
name: 'body',
title: 'Body',
type: 'markdown',
},
{
name: 'image',
title: 'Image',
type: 'array',
of: [{type: 'image'}]
},
{
name: 'caption',
type: 'string',
title: 'Main (first) image caption',
},
{
name: 'maker',
title: 'Maker',
type: 'string',
}
]
})