From c6ac05f4db3261128c7434aab2a373dc84770136 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 6 Jul 2024 15:15:10 +0200 Subject: [PATCH] Add teaser image to blog posts --- .../blog-post/content-types/blog-post/schema.json | 15 +++++++++++++++ types/generated/contentTypes.d.ts | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/src/api/blog-post/content-types/blog-post/schema.json b/src/api/blog-post/content-types/blog-post/schema.json index 60a5b90..831f815 100644 --- a/src/api/blog-post/content-types/blog-post/schema.json +++ b/src/api/blog-post/content-types/blog-post/schema.json @@ -58,6 +58,21 @@ "relation": "manyToOne", "target": "api::blog-collection.blog-collection", "inversedBy": "posts" + }, + "teaser_image": { + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ], + "type": "media", + "multiple": false, + "pluginOptions": { + "i18n": { + "localized": true + } + } } } } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index de70516..10aae36 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -978,6 +978,12 @@ export interface ApiBlogPostBlogPost extends Schema.CollectionType { 'manyToOne', 'api::blog-collection.blog-collection' >; + teaser_image: Attribute.Media<'images' | 'files' | 'videos' | 'audios'> & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; publishedAt: Attribute.DateTime;