aboutsummaryrefslogtreecommitdiffstats
path: root/sanity/schemas/hero.ts
blob: 8534675b903e3ef3135cf8de213e4738ff3cbefe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { defineType } from "sanity";

export default defineType({
    name: 'hero',
    type: 'document',
    title: 'Hero section',
    i18n: true,
    fields: [
        {
            title: "Title",
            name: 'title',
            type: 'string',
        },
        {
            title: "Content",
            name: "content",
            type: "array",
            of: [{ type: "block" }]
        },
        {
            title: "Image",
            name: "image",
            type: "image",
            fields: [
                {
                    title: "Alternative text",
                    name: 'alt',
                    type: 'string',
                }
            ]
        }
    ]
})