diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2023-02-18 15:25:29 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2023-02-18 15:25:29 +0100 |
| commit | 69d345b334c7a3fecdb0cd5f440fabd83a755309 (patch) | |
| tree | 09de5c21f7989a98397e6e700f8d4e9347e8bd90 /sanity/schemas/hero.ts | |
| parent | c709aa638c7d3458dd73c3aabadb4924cb1cb80e (diff) | |
| download | auroraklinikken.no-69d345b334c7a3fecdb0cd5f440fabd83a755309.tar.xz auroraklinikken.no-69d345b334c7a3fecdb0cd5f440fabd83a755309.zip | |
.
Diffstat (limited to 'sanity/schemas/hero.ts')
| -rw-r--r-- | sanity/schemas/hero.ts | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/sanity/schemas/hero.ts b/sanity/schemas/hero.ts index 48e5c77..8534675 100644 --- a/sanity/schemas/hero.ts +++ b/sanity/schemas/hero.ts @@ -1,14 +1,10 @@ -import { baseLanguage } from "./_locales"; +import { defineType } from "sanity"; -export default { +export default defineType({ name: 'hero', type: 'document', title: 'Hero section', - preview: { - select: { - title: `title.${baseLanguage.id}` - } - }, + i18n: true, fields: [ { title: "Title", @@ -16,14 +12,22 @@ export default { type: 'string', }, { - title: "Subtitle", - name: "subtitle", - type: "string", + title: "Content", + name: "content", + type: "array", + of: [{ type: "block" }] }, { title: "Image", name: "image", - type: "image" + type: "image", + fields: [ + { + title: "Alternative text", + name: 'alt', + type: 'string', + } + ] } ] -}
\ No newline at end of file +})
\ No newline at end of file |
