Build base types
This commit is contained in:
23
src/api/global/content-types/global/schema.json
Normal file
23
src/api/global/content-types/global/schema.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "globals",
|
||||
"info": {
|
||||
"singularName": "global",
|
||||
"pluralName": "globals",
|
||||
"displayName": "Global"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "blocks"
|
||||
},
|
||||
"SEO": {
|
||||
"type": "component",
|
||||
"component": "global.seo",
|
||||
"repeatable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/global/controllers/global.ts
Normal file
7
src/api/global/controllers/global.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* global controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::global.global');
|
||||
7
src/api/global/routes/global.ts
Normal file
7
src/api/global/routes/global.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* global router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::global.global');
|
||||
7
src/api/global/services/global.ts
Normal file
7
src/api/global/services/global.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* global service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::global.global');
|
||||
24
src/components/global/seo.json
Normal file
24
src/components/global/seo.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"collectionName": "components_global_seos",
|
||||
"info": {
|
||||
"displayName": "SEO",
|
||||
"icon": "stack"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"image": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
Reference in New Issue
Block a user