aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/sanity/schemas/default/hero.ts
blob: df7b8ae3b812b98b9bd75a6a82e128458c58256b (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
import { s } from "sanity-typed-schema-builder";

export default s.document({
  name: "hero",
  title: "Hero section",
  // @ts-ignore
  i18n: true,
  fields: [
    {
      title: "Title",
      name: "title",
      type: s.string(),
    },
    {
      title: "Content",
      name: "content",
      type: s.array({
        of: [s.block()]
      }),
    },
    {
      title: "Image",
      name: "image",
      type: s.image(),
      optional: true
    },
  ],
});