-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEV-1340] Add homepage to strapi (#592)
* update strapi * Fix error on managing endpoint permission * add homepage and related link * Fix linting problems * add generated to gitignore * update package-lock * update gitignore * add change set * Revert tsconfig update * add compile and precompile * Fix permission error and add comment * Update apps/strapi-cms/package.json Co-authored-by: AF <[email protected]> * Update package-lock after merge with main * Rename home-page to homepage for consistency reasons --------- Co-authored-by: marcobottaro <[email protected]> Co-authored-by: AF <[email protected]> Co-authored-by: Marco Bottaro <[email protected]>
- Loading branch information
1 parent
908bcaa
commit b0c18a7
Showing
11 changed files
with
3,162 additions
and
2,986 deletions.
There are no files selected for viewing
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,5 @@ | ||
--- | ||
"strapi-cms": minor | ||
--- | ||
|
||
Add Homepage content to strapi and RelatedLinks and Link components |
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
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
20 changes: 20 additions & 0 deletions
20
apps/strapi-cms/src/api/homepage/content-types/homepage/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,20 @@ | ||
{ | ||
"kind": "singleType", | ||
"collectionName": "homepages", | ||
"info": { | ||
"singularName": "homepage", | ||
"pluralName": "homepages", | ||
"displayName": "Homepage" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"comingsoonDocumentation": { | ||
"type": "component", | ||
"repeatable": false, | ||
"component": "common.related-links" | ||
} | ||
} | ||
} |
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,7 @@ | ||
/** | ||
* homepage controller | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreController('api::homepage.homepage'); |
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,7 @@ | ||
/** | ||
* homepage router | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreRouter('api::homepage.homepage'); |
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,7 @@ | ||
/** | ||
* homepage service | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreService('api::homepage.homepage'); |
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,27 @@ | ||
{ | ||
"collectionName": "components_common_links", | ||
"info": { | ||
"displayName": "Links", | ||
"icon": "link" | ||
}, | ||
"options": {}, | ||
"attributes": { | ||
"text": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"href": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"target": { | ||
"type": "enumeration", | ||
"enum": [ | ||
"_self", | ||
"_blank", | ||
"_parent", | ||
"_top" | ||
] | ||
} | ||
} | ||
} |
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,19 @@ | ||
{ | ||
"collectionName": "components_common_related_links", | ||
"info": { | ||
"displayName": "RelatedLinks", | ||
"icon": "bulletList", | ||
"description": "" | ||
}, | ||
"options": {}, | ||
"attributes": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"links": { | ||
"type": "component", | ||
"repeatable": true, | ||
"component": "common.links" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.