aboutsummaryrefslogtreecommitdiffstats
path: root/sanity/schemas/hero.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sanity/schemas/hero.ts')
-rw-r--r--sanity/schemas/hero.ts28
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