Add more juicy content

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

@ -31,9 +31,13 @@
"components": [ "components": [
"content.gallery", "content.gallery",
"content.image", "content.image",
"content.text-markdown", "content.text-markdown"
"content.infobox"
] ]
},
"tags": {
"type": "relation",
"relation": "oneToMany",
"target": "api::tag.tag"
} }
} }
} }

@ -0,0 +1,22 @@
{
"kind": "collectionType",
"collectionName": "tags",
"info": {
"singularName": "tag",
"pluralName": "tags",
"displayName": "Tag"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name"
}
}
}

@ -0,0 +1,9 @@
'use strict';
/**
* tag controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::tag.tag');

@ -0,0 +1,9 @@
'use strict';
/**
* tag router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::tag.tag');

@ -0,0 +1,9 @@
'use strict';
/**
* tag service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::tag.tag');

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

@ -8,6 +8,15 @@
"attributes": { "attributes": {
"value": { "value": {
"type": "richtext" "type": "richtext"
},
"type": {
"type": "enumeration",
"enum": [
"paragraph",
"infobox"
],
"default": "paragraph",
"required": true
} }
} }
} }

@ -20,16 +20,6 @@ export interface ContentImage extends Schema.Component {
}; };
} }
export interface ContentInfobox extends Schema.Component {
collectionName: 'components_content_infoboxes';
info: {
displayName: 'infobox';
};
attributes: {
value: Attribute.RichText;
};
}
export interface ContentTextMarkdown extends Schema.Component { export interface ContentTextMarkdown extends Schema.Component {
collectionName: 'components_content_text_markdowns'; collectionName: 'components_content_text_markdowns';
info: { info: {
@ -38,6 +28,9 @@ export interface ContentTextMarkdown extends Schema.Component {
}; };
attributes: { attributes: {
value: Attribute.RichText; value: Attribute.RichText;
type: Attribute.Enumeration<['paragraph', 'infobox']> &
Attribute.Required &
Attribute.DefaultTo<'paragraph'>;
}; };
} }
@ -46,7 +39,6 @@ declare module '@strapi/types' {
export interface Components { export interface Components {
'content.gallery': ContentGallery; 'content.gallery': ContentGallery;
'content.image': ContentImage; 'content.image': ContentImage;
'content.infobox': ContentInfobox;
'content.text-markdown': ContentTextMarkdown; 'content.text-markdown': ContentTextMarkdown;
} }
} }

@ -362,88 +362,6 @@ 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: {
@ -909,6 +827,111 @@ export interface PluginSlugifySlug 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']
>;
tags: Attribute.Relation<
'api::blog-post.blog-post',
'oneToMany',
'api::tag.tag'
>;
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 ApiTagTag extends Schema.CollectionType {
collectionName: 'tags';
info: {
singularName: 'tag';
pluralName: 'tags';
displayName: 'Tag';
};
options: {
draftAndPublish: true;
};
attributes: {
name: Attribute.String;
slug: Attribute.UID<'api::tag.tag', 'name'>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<'api::tag.tag', 'oneToOne', 'admin::user'> &
Attribute.Private;
updatedBy: Attribute.Relation<'api::tag.tag', 'oneToOne', 'admin::user'> &
Attribute.Private;
};
}
declare module '@strapi/types' { declare module '@strapi/types' {
export module Shared { export module Shared {
export interface ContentTypes { export interface ContentTypes {
@ -919,8 +942,6 @@ 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;
@ -930,6 +951,9 @@ declare module '@strapi/types' {
'plugin::users-permissions.role': PluginUsersPermissionsRole; 'plugin::users-permissions.role': PluginUsersPermissionsRole;
'plugin::users-permissions.user': PluginUsersPermissionsUser; 'plugin::users-permissions.user': PluginUsersPermissionsUser;
'plugin::slugify.slug': PluginSlugifySlug; 'plugin::slugify.slug': PluginSlugifySlug;
'api::author.author': ApiAuthorAuthor;
'api::blog-post.blog-post': ApiBlogPostBlogPost;
'api::tag.tag': ApiTagTag;
} }
} }
} }

Loading…
Cancel
Save