1
0
Fork 0
freesewing/sites/sanity/schemas/blog.js

49 lines
800 B
JavaScript
Raw Normal View History

2022-10-20 22:36:16 +02:00
export const blogSchemaBuilder = (lang) => ({
name: `blog${lang}`,
type: 'document',
title: `Blog ${lang.toUpperCase()}`,
fields: [
{
name: 'title',
type: 'string',
title: 'Title',
},
{
name: 'linktitle',
type: 'string',
title: 'Link Title',
},
{
name: 'slug',
type: 'slug',
title: 'Slug',
},
{
name: 'date',
type: 'date',
title: 'Date',
},
{
name: 'image',
type: 'image',
title: 'Image',
},
{
name: 'caption',
type: 'string',
title: 'Caption',
},
{
name: 'body',
title: 'Body',
type: 'array',
of: [{type: 'block'}]
},
{
name: 'author',
title: 'Author',
type: 'string',
}
]
})