blog (#4)
Some checks failed
Deployment / Deploy website (push) Failing after 58s
Deployment / Deploy strapi (push) Successful in 3m0s

Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com>
Reviewed-on: #4
This commit is contained in:
Benjamin Palko 2025-05-05 13:02:22 -04:00
parent b2844e8d76
commit 14fe55bb31
18 changed files with 3164 additions and 30 deletions

View file

@ -0,0 +1,36 @@
{
"kind": "collectionType",
"collectionName": "blogs",
"info": {
"singularName": "blog",
"pluralName": "blogs",
"displayName": "Blog",
"description": ""
},
"options": {
"draftAndPublish": true
},
"attributes": {
"Title": {
"type": "string",
"required": true,
"unique": true
},
"Body": {
"type": "richtext",
"required": true
},
"Topics": {
"displayName": "Tag",
"type": "component",
"repeatable": true,
"component": "shared.tag"
},
"Header": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": ["images"]
}
}
}

View file

@ -0,0 +1,7 @@
/**
* blog controller
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreController('api::blog.blog');

View file

@ -0,0 +1,7 @@
/**
* blog router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::blog.blog');

View file

@ -0,0 +1,7 @@
/**
* blog service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::blog.blog');

View file

@ -0,0 +1,14 @@
{
"collectionName": "components_shared_tags",
"info": {
"displayName": "Tag",
"icon": "priceTag"
},
"options": {},
"attributes": {
"Topic": {
"type": "enumeration",
"enum": ["development", "work", "life"]
}
}
}