-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(playground): add article component with blocks element
Adds a new content type with the new blocks rich text format
- Loading branch information
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
playground/src/api/blocks-article/content-types/blocks-article/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "blocks_articles", | ||
"info": { | ||
"singularName": "blocks-article", | ||
"pluralName": "blocks-articles", | ||
"displayName": "BlocksArticle", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"attributes": { | ||
"Title": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
}, | ||
"translate": { | ||
"translate": "translate" | ||
} | ||
} | ||
}, | ||
"Content": { | ||
"type": "blocks", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
}, | ||
"translate": { | ||
"translate": "translate" | ||
} | ||
} | ||
}, | ||
"writer": { | ||
"type": "relation", | ||
"relation": "oneToOne", | ||
"target": "api::writer.writer", | ||
"pluginOptions": { | ||
"translate": { | ||
"translate": "translate" | ||
} | ||
} | ||
}, | ||
"category": { | ||
"type": "relation", | ||
"relation": "oneToOne", | ||
"target": "api::category.category", | ||
"pluginOptions": { | ||
"translate": { | ||
"translate": "translate" | ||
} | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
playground/src/api/blocks-article/controllers/blocks-article.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* blocks-article controller | ||
*/ | ||
|
||
const { createCoreController } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreController('api::blocks-article.blocks-article'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* blocks-article router | ||
*/ | ||
|
||
const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreRouter('api::blocks-article.blocks-article'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* blocks-article service | ||
*/ | ||
|
||
const { createCoreService } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreService('api::blocks-article.blocks-article'); |