Change content type

main
trivernis 5 months ago
parent d4b7654be5
commit 5b81ec3f74
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

Binary file not shown.

@ -12,14 +12,15 @@
}, },
"devDependencies": {}, "devDependencies": {},
"dependencies": { "dependencies": {
"@strapi/strapi": "4.25.1",
"@strapi/plugin-users-permissions": "4.25.1",
"@strapi/plugin-i18n": "4.25.1",
"@strapi/plugin-cloud": "4.25.1", "@strapi/plugin-cloud": "4.25.1",
"@strapi/plugin-i18n": "4.25.1",
"@strapi/plugin-users-permissions": "4.25.1",
"@strapi/strapi": "4.25.1",
"better-sqlite3": "8.6.0", "better-sqlite3": "8.6.0",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-router-dom": "5.3.4", "react-router-dom": "5.3.4",
"strapi-plugin-slugify": "^2.3.8",
"styled-components": "5.3.3" "styled-components": "5.3.3"
}, },
"author": { "author": {

@ -4,7 +4,8 @@
"info": { "info": {
"singularName": "author", "singularName": "author",
"pluralName": "authors", "pluralName": "authors",
"displayName": "Author" "displayName": "Author",
"description": ""
}, },
"options": { "options": {
"draftAndPublish": true "draftAndPublish": true
@ -15,17 +16,19 @@
"type": "string" "type": "string"
}, },
"profilePicture": { "profilePicture": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media",
"multiple": true
}, },
"slug": { "slug": {
"type": "uid" "type": "uid",
"targetField": "name"
} }
} }
} }

@ -4,7 +4,8 @@
"info": { "info": {
"singularName": "blog-post", "singularName": "blog-post",
"pluralName": "blog-posts", "pluralName": "blog-posts",
"displayName": "Blog Post" "displayName": "Blog Post",
"description": ""
}, },
"options": { "options": {
"draftAndPublish": true "draftAndPublish": true
@ -12,10 +13,13 @@
"pluginOptions": {}, "pluginOptions": {},
"attributes": { "attributes": {
"slug": { "slug": {
"type": "uid" "type": "uid",
"targetField": "title",
"required": true
}, },
"title": { "title": {
"type": "string" "type": "string",
"required": true
}, },
"author": { "author": {
"type": "relation", "type": "relation",
@ -23,7 +27,13 @@
"target": "api::author.author" "target": "api::author.author"
}, },
"content": { "content": {
"type": "richtext" "type": "dynamiczone",
"components": [
"content.gallery",
"content.image",
"content.text-markdown",
"content.infobox"
]
} }
} }
} }

@ -0,0 +1,19 @@
{
"collectionName": "components_content_galleries",
"info": {
"displayName": "Gallery"
},
"options": {},
"attributes": {
"value": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": true
}
}
}

@ -0,0 +1,19 @@
{
"collectionName": "components_content_images",
"info": {
"displayName": "Image"
},
"options": {},
"attributes": {
"value": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
}
}

@ -0,0 +1,12 @@
{
"collectionName": "components_content_infoboxes",
"info": {
"displayName": "infobox"
},
"options": {},
"attributes": {
"value": {
"type": "richtext"
}
}
}

@ -0,0 +1,13 @@
{
"collectionName": "components_content_text_markdowns",
"info": {
"displayName": "Text - Markdown",
"description": ""
},
"options": {},
"attributes": {
"value": {
"type": "richtext"
}
}
}

@ -1,5 +1,53 @@
import type { Schema, Attribute } from '@strapi/strapi'; import type { Schema, Attribute } from '@strapi/strapi';
export interface ContentGallery extends Schema.Component {
collectionName: 'components_content_galleries';
info: {
displayName: 'Gallery';
};
attributes: {
value: Attribute.Media<'images' | 'files' | 'videos' | 'audios', true>;
};
}
export interface ContentImage extends Schema.Component {
collectionName: 'components_content_images';
info: {
displayName: 'Image';
};
attributes: {
value: Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
};
}
export interface ContentInfobox extends Schema.Component {
collectionName: 'components_content_infoboxes';
info: {
displayName: 'infobox';
};
attributes: {
value: Attribute.RichText;
};
}
export interface ContentTextMarkdown extends Schema.Component {
collectionName: 'components_content_text_markdowns';
info: {
displayName: 'Text - Markdown';
description: '';
};
attributes: {
value: Attribute.RichText;
};
}
declare module '@strapi/types' { declare module '@strapi/types' {
export module Shared {} export module Shared {
export interface Components {
'content.gallery': ContentGallery;
'content.image': ContentImage;
'content.infobox': ContentInfobox;
'content.text-markdown': ContentTextMarkdown;
}
}
} }

@ -362,6 +362,88 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType {
}; };
} }
export interface ApiAuthorAuthor extends Schema.CollectionType {
collectionName: 'authors';
info: {
singularName: 'author';
pluralName: 'authors';
displayName: 'Author';
description: '';
};
options: {
draftAndPublish: true;
};
attributes: {
name: Attribute.String;
profilePicture: Attribute.Media<
'images' | 'files' | 'videos' | 'audios',
true
>;
slug: Attribute.UID<'api::author.author', 'name'>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface ApiBlogPostBlogPost extends Schema.CollectionType {
collectionName: 'blog_posts';
info: {
singularName: 'blog-post';
pluralName: 'blog-posts';
displayName: 'Blog Post';
description: '';
};
options: {
draftAndPublish: true;
};
attributes: {
slug: Attribute.UID<'api::blog-post.blog-post', 'title'> &
Attribute.Required;
title: Attribute.String & Attribute.Required;
author: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'api::author.author'
>;
content: Attribute.DynamicZone<
[
'content.gallery',
'content.image',
'content.text-markdown',
'content.infobox'
]
>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface PluginUploadFile extends Schema.CollectionType { export interface PluginUploadFile extends Schema.CollectionType {
collectionName: 'files'; collectionName: 'files';
info: { info: {
@ -590,6 +672,53 @@ export interface PluginContentReleasesReleaseAction
}; };
} }
export interface PluginI18NLocale extends Schema.CollectionType {
collectionName: 'i18n_locale';
info: {
singularName: 'locale';
pluralName: 'locales';
collectionName: 'locales';
displayName: 'Locale';
description: '';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Attribute.String &
Attribute.SetMinMax<
{
min: 1;
max: 50;
},
number
>;
code: Attribute.String & Attribute.Unique;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'plugin::i18n.locale',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'plugin::i18n.locale',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface PluginUsersPermissionsPermission export interface PluginUsersPermissionsPermission
extends Schema.CollectionType { extends Schema.CollectionType {
collectionName: 'up_permissions'; collectionName: 'up_permissions';
@ -741,17 +870,16 @@ export interface PluginUsersPermissionsUser extends Schema.CollectionType {
}; };
} }
export interface PluginI18NLocale extends Schema.CollectionType { export interface PluginSlugifySlug extends Schema.CollectionType {
collectionName: 'i18n_locale'; collectionName: 'slugs';
info: { info: {
singularName: 'locale'; singularName: 'slug';
pluralName: 'locales'; pluralName: 'slugs';
collectionName: 'locales'; displayName: 'slug';
displayName: 'Locale';
description: '';
}; };
options: { options: {
draftAndPublish: false; draftAndPublish: false;
comment: '';
}; };
pluginOptions: { pluginOptions: {
'content-manager': { 'content-manager': {
@ -762,97 +890,18 @@ export interface PluginI18NLocale extends Schema.CollectionType {
}; };
}; };
attributes: { attributes: {
name: Attribute.String & slug: Attribute.Text;
Attribute.SetMinMax< count: Attribute.Integer;
{
min: 1;
max: 50;
},
number
>;
code: Attribute.String & Attribute.Unique;
createdAt: Attribute.DateTime; createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime; updatedAt: Attribute.DateTime;
createdBy: Attribute.Relation< createdBy: Attribute.Relation<
'plugin::i18n.locale', 'plugin::slugify.slug',
'oneToOne', 'oneToOne',
'admin::user' 'admin::user'
> & > &
Attribute.Private; Attribute.Private;
updatedBy: Attribute.Relation< updatedBy: Attribute.Relation<
'plugin::i18n.locale', 'plugin::slugify.slug',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface ApiAuthorAuthor extends Schema.CollectionType {
collectionName: 'authors';
info: {
singularName: 'author';
pluralName: 'authors';
displayName: 'Author';
};
options: {
draftAndPublish: true;
};
attributes: {
name: Attribute.String;
profilePicture: Attribute.Media<
'images' | 'files' | 'videos' | 'audios',
true
>;
slug: Attribute.UID;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface ApiBlogPostBlogPost extends Schema.CollectionType {
collectionName: 'blog_posts';
info: {
singularName: 'blog-post';
pluralName: 'blog-posts';
displayName: 'Blog Post';
};
options: {
draftAndPublish: true;
};
attributes: {
slug: Attribute.UID;
title: Attribute.String;
author: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'api::author.author'
>;
content: Attribute.RichText;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne', 'oneToOne',
'admin::user' 'admin::user'
> & > &
@ -870,16 +919,17 @@ declare module '@strapi/types' {
'admin::api-token-permission': AdminApiTokenPermission; 'admin::api-token-permission': AdminApiTokenPermission;
'admin::transfer-token': AdminTransferToken; 'admin::transfer-token': AdminTransferToken;
'admin::transfer-token-permission': AdminTransferTokenPermission; 'admin::transfer-token-permission': AdminTransferTokenPermission;
'api::author.author': ApiAuthorAuthor;
'api::blog-post.blog-post': ApiBlogPostBlogPost;
'plugin::upload.file': PluginUploadFile; 'plugin::upload.file': PluginUploadFile;
'plugin::upload.folder': PluginUploadFolder; 'plugin::upload.folder': PluginUploadFolder;
'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release': PluginContentReleasesRelease;
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
'plugin::i18n.locale': PluginI18NLocale;
'plugin::users-permissions.permission': PluginUsersPermissionsPermission; 'plugin::users-permissions.permission': PluginUsersPermissionsPermission;
'plugin::users-permissions.role': PluginUsersPermissionsRole; 'plugin::users-permissions.role': PluginUsersPermissionsRole;
'plugin::users-permissions.user': PluginUsersPermissionsUser; 'plugin::users-permissions.user': PluginUsersPermissionsUser;
'plugin::i18n.locale': PluginI18NLocale; 'plugin::slugify.slug': PluginSlugifySlug;
'api::author.author': ApiAuthorAuthor;
'api::blog-post.blog-post': ApiBlogPostBlogPost;
} }
} }
} }

@ -109,7 +109,7 @@
core-js-pure "^3.30.2" core-js-pure "^3.30.2"
regenerator-runtime "^0.14.0" regenerator-runtime "^0.14.0"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.24.7" version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12"
integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==
@ -2074,7 +2074,7 @@
"@strapi/utils" "4.25.1" "@strapi/utils" "4.25.1"
fs-extra "10.0.0" fs-extra "10.0.0"
"@strapi/strapi@4.25.1": "@strapi/strapi@4.25.1", "@strapi/strapi@^4.14.0":
version "4.25.1" version "4.25.1"
resolved "https://registry.yarnpkg.com/@strapi/strapi/-/strapi-4.25.1.tgz#3871f1786249ad65a2a8cafbc660c3320a53eeae" resolved "https://registry.yarnpkg.com/@strapi/strapi/-/strapi-4.25.1.tgz#3871f1786249ad65a2a8cafbc660c3320a53eeae"
integrity sha512-GzsIArE/jkK78v7w/gQXQ02lfb1cnb0qyvTUotSOwh9FzZhV+nGURkNYvlSooyEtDxOIimD1RnkRP11iOW0kHA== integrity sha512-GzsIArE/jkK78v7w/gQXQ02lfb1cnb0qyvTUotSOwh9FzZhV+nGURkNYvlSooyEtDxOIimD1RnkRP11iOW0kHA==
@ -2204,7 +2204,7 @@
aria-hidden "^1.2.4" aria-hidden "^1.2.4"
react-remove-scroll "^2.5.9" react-remove-scroll "^2.5.9"
"@strapi/utils@4.25.1": "@strapi/utils@4.25.1", "@strapi/utils@^4.14.0":
version "4.25.1" version "4.25.1"
resolved "https://registry.yarnpkg.com/@strapi/utils/-/utils-4.25.1.tgz#9df2726bae6a75b0de9a104166f0a84af51e0de1" resolved "https://registry.yarnpkg.com/@strapi/utils/-/utils-4.25.1.tgz#9df2726bae6a75b0de9a104166f0a84af51e0de1"
integrity sha512-QuvGfAbHU2I1ebZThoF3GzAtLQVClP9VKrL3IaSy3MfKbH9xzLpg+ROiwUAawgR7Qi/zF8865VCCe4tdqJUB7Q== integrity sha512-QuvGfAbHU2I1ebZThoF3GzAtLQVClP9VKrL3IaSy3MfKbH9xzLpg+ROiwUAawgR7Qi/zF8865VCCe4tdqJUB7Q==
@ -2473,7 +2473,7 @@
"@types/interpret" "*" "@types/interpret" "*"
"@types/node" "*" "@types/node" "*"
"@types/lodash@^4.14.149", "@types/lodash@^4.14.165": "@types/lodash@^4.14.149", "@types/lodash@^4.14.165", "@types/lodash@^4.14.175":
version "4.17.5" version "4.17.5"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04"
integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==
@ -8979,6 +8979,17 @@ statuses@2.0.1, statuses@^2.0.1:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
strapi-plugin-slugify@^2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/strapi-plugin-slugify/-/strapi-plugin-slugify-2.3.8.tgz#feed725c6becbb0408ce601f40055aaa76b98316"
integrity sha512-lbC04NaVgy18nY0l4KI4ld6h1L5bGAvEe0H3hOdFnaksKRRu+rwTaB58oQQBqZtWu4lZ2n2dtMQJB/mSmFd8KA==
dependencies:
"@sindresorhus/slugify" "1.1.0"
"@strapi/strapi" "^4.14.0"
"@strapi/utils" "^4.14.0"
lodash "^4.17.21"
yup "^0.32.9"
stream-chain@2.2.5, stream-chain@^2.2.5: stream-chain@2.2.5, stream-chain@^2.2.5:
version "2.2.5" version "2.2.5"
resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09" resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09"
@ -9989,3 +10000,16 @@ yup@0.32.9:
nanoclone "^0.2.1" nanoclone "^0.2.1"
property-expr "^2.0.4" property-expr "^2.0.4"
toposort "^2.0.2" toposort "^2.0.2"
yup@^0.32.9:
version "0.32.11"
resolved "https://registry.yarnpkg.com/yup/-/yup-0.32.11.tgz#d67fb83eefa4698607982e63f7ca4c5ed3cf18c5"
integrity sha512-Z2Fe1bn+eLstG8DRR6FTavGD+MeAwyfmouhHsIUgaADz8jvFKbO/fXc2trJKZg+5EBjh4gGm3iU/t3onKlXHIg==
dependencies:
"@babel/runtime" "^7.15.4"
"@types/lodash" "^4.14.175"
lodash "^4.17.21"
lodash-es "^4.17.21"
nanoclone "^0.2.1"
property-expr "^2.0.4"
toposort "^2.0.2"

Loading…
Cancel
Save