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 4a02029..dc34ec1 100644 --- a/src/api/blog-post/content-types/blog-post/schema.json +++ b/src/api/blog-post/content-types/blog-post/schema.json @@ -40,7 +40,8 @@ "components": [ "content.gallery", "content.image", - "content.text-markdown" + "content.text-markdown", + "content.infobox" ], "pluginOptions": { "i18n": { diff --git a/src/components/content/infobox.json b/src/components/content/infobox.json new file mode 100644 index 0000000..b40e09e --- /dev/null +++ b/src/components/content/infobox.json @@ -0,0 +1,15 @@ +{ + "collectionName": "components_content_infoboxes", + "info": { + "displayName": "Infobox" + }, + "options": {}, + "attributes": { + "title": { + "type": "string" + }, + "value": { + "type": "richtext" + } + } +} diff --git a/src/components/content/text-markdown.json b/src/components/content/text-markdown.json index d99f707..61c13f2 100644 --- a/src/components/content/text-markdown.json +++ b/src/components/content/text-markdown.json @@ -1,22 +1,13 @@ { "collectionName": "components_content_text_markdowns", "info": { - "displayName": "Text - Markdown", + "displayName": "Paragraph", "description": "" }, "options": {}, "attributes": { "value": { "type": "richtext" - }, - "type": { - "type": "enumeration", - "enum": [ - "paragraph", - "infobox" - ], - "default": "paragraph", - "required": true } } } diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index a3fdfec..2038bb3 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -20,17 +20,25 @@ export interface ContentImage extends Schema.Component { }; } +export interface ContentInfobox extends Schema.Component { + collectionName: 'components_content_infoboxes'; + info: { + displayName: 'Infobox'; + }; + attributes: { + title: Attribute.String; + value: Attribute.RichText; + }; +} + export interface ContentTextMarkdown extends Schema.Component { collectionName: 'components_content_text_markdowns'; info: { - displayName: 'Text - Markdown'; + displayName: 'Paragraph'; description: ''; }; attributes: { value: Attribute.RichText; - type: Attribute.Enumeration<['paragraph', 'infobox']> & - Attribute.Required & - Attribute.DefaultTo<'paragraph'>; }; } @@ -39,6 +47,7 @@ declare module '@strapi/types' { export interface Components { 'content.gallery': ContentGallery; 'content.image': ContentImage; + 'content.infobox': ContentInfobox; 'content.text-markdown': ContentTextMarkdown; } } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index a10c6e4..dd4ef77 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -961,7 +961,12 @@ export interface ApiBlogPostBlogPost extends Schema.CollectionType { 'api::author.author' >; content: Attribute.DynamicZone< - ['content.gallery', 'content.image', 'content.text-markdown'] + [ + 'content.gallery', + 'content.image', + 'content.text-markdown', + 'content.infobox' + ] > & Attribute.SetPluginOptions<{ i18n: {