Skip to content

Commit

Permalink
Update homepage list previews
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Richard committed Mar 13, 2024
1 parent 86af03c commit b58feef
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cms/schemas/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ export default defineType({
],
}),
],
preview: {
select: {
title: 'statistic.stat',
subtitle: 'statistic.description',
},
prepare({ title, subtitle }) {
return {
title,
subtitle,
};
},
},
}),
],
}),
Expand Down Expand Up @@ -277,6 +289,21 @@ export default defineType({
type: 'picture',
}),
],
preview: {
select: {
quote: 'quote',
author: 'author.name',
title: 'author.title',
image: 'image',
},
prepare({ quote, author, title, image }) {
return {
title: quote,
subtitle: `${author}, ${title}`,
media: image,
};
},
},
}),
],
}),
Expand Down
7 changes: 7 additions & 0 deletions cms/schemas/subschema/homepage-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,11 @@ export default defineType({
],
}),
],
preview: {
select: {
title: 'content.title',
subtitle: 'content.copy',
media: 'image',
},
},
});

0 comments on commit b58feef

Please sign in to comment.