Added some wiki foundation

This commit is contained in:
DrMint 2022-02-18 14:15:27 +01:00
parent 500abc2d92
commit fa87fce984
12 changed files with 261 additions and 36 deletions

View File

@ -22,24 +22,9 @@
"main_library_description": { "main_library_description": {
"type": "string" "type": "string"
}, },
"main_hub": {
"type": "string"
},
"main_hub_description": {
"type": "string"
},
"main_chronology": {
"type": "string"
},
"main_chronology_description": {
"type": "string"
},
"main_news": { "main_news": {
"type": "string" "type": "string"
}, },
"main_data": {
"type": "string"
},
"main_merch": { "main_merch": {
"type": "string" "type": "string"
}, },
@ -127,27 +112,6 @@
"library_item_type_information": { "library_item_type_information": {
"type": "string" "type": "string"
}, },
"chronology_description": {
"type": "text"
},
"chronology_timelines": {
"type": "string"
},
"chronology_timelines_description": {
"type": "string"
},
"chronology_overview": {
"type": "string"
},
"chronology_overview_description": {
"type": "string"
},
"chronology_walkthrough": {
"type": "string"
},
"chronology_walkthrough_description": {
"type": "string"
},
"library_item_front_matter": { "library_item_front_matter": {
"type": "string" "type": "string"
}, },
@ -201,6 +165,51 @@
}, },
"global_right_to_left": { "global_right_to_left": {
"type": "string" "type": "string"
},
"main_wiki": {
"type": "string"
},
"main_wiki_description": {
"type": "string"
},
"main_chronicles": {
"type": "string"
},
"main_chronicles_description": {
"type": "string"
},
"library_items": {
"type": "string"
},
"library_items_description": {
"type": "string"
},
"library_content": {
"type": "string"
},
"library_content_description": {
"type": "string"
},
"wiki_description": {
"type": "text"
},
"news_description": {
"type": "text"
},
"chronicles_description": {
"type": "text"
},
"gallery_description": {
"type": "text"
},
"archives_description": {
"type": "text"
},
"about_us_description": {
"type": "text"
},
"merch_description": {
"type": "text"
} }
} }
} }

View File

@ -0,0 +1,26 @@
{
"kind": "collectionType",
"collectionName": "wiki_page_types",
"info": {
"singularName": "wiki-page-type",
"pluralName": "wiki-page-types",
"displayName": "🟥 Wiki Page Types",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"slug": {
"type": "string",
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
"unique": true,
"required": true
},
"titles": {
"type": "component",
"repeatable": true,
"component": "translations.simple-title"
}
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,40 @@
{
"kind": "collectionType",
"collectionName": "wiki_pages",
"info": {
"singularName": "wiki-page",
"pluralName": "wiki-pages",
"displayName": "🟥 Wiki Pages",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"slug": {
"type": "string",
"required": true,
"unique": true,
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"thumbnail": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
},
"wiki_set": {
"displayName": "wiki_set",
"type": "component",
"repeatable": true,
"component": "sets.wiki-set"
},
"type": {
"type": "relation",
"relation": "oneToOne",
"target": "api::wiki-page-type.wiki-page-type"
}
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,14 @@
{
"collectionName": "components_collections_component_titles",
"info": {
"displayName": "titles",
"icon": "bullhorn"
},
"options": {},
"attributes": {
"title": {
"type": "string",
"required": true
}
}
}

View File

@ -0,0 +1,23 @@
{
"collectionName": "components_collections_component_wiki_definitions",
"info": {
"displayName": "wiki-definition",
"icon": "pen"
},
"options": {},
"attributes": {
"definition": {
"type": "text"
},
"categories": {
"type": "relation",
"relation": "oneToMany",
"target": "api::category.category"
},
"source": {
"type": "relation",
"relation": "oneToOne",
"target": "api::source.source"
}
}
}

View File

@ -0,0 +1,59 @@
{
"collectionName": "components_sets_wiki_sets",
"info": {
"displayName": "wiki_set",
"icon": "at",
"description": ""
},
"options": {},
"attributes": {
"language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"status": {
"type": "enumeration",
"enum": [
"Incomplete",
"Draft",
"Review",
"Done"
],
"required": true,
"default": "Incomplete"
},
"titles": {
"displayName": "titles",
"type": "component",
"repeatable": true,
"component": "collections-component.titles"
},
"summary": {
"type": "text"
},
"body": {
"type": "richtext"
},
"source_language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"authors": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"translators": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"proofreaders": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
}
}
}