├── README.md └── shared ├── meta-social.json └── seo.json /README.md: -------------------------------------------------------------------------------- 1 | # Strapi components 2 | 3 | This repository contains a list of [Strapi components](https://docs.strapi.io/user-docs/latest/content-types-builder/configuring-fields-content-type.html#components) using the best practices to manage your content. 4 | 5 | ## Categories 6 | 7 | Categories must be named depending on the use case of your components. (ex: `shared` folder will contain components that are meant to be shared between every Content-Types) 8 | 9 | Feel free to add your own components. Your feedback and contributions are welcome! 10 | -------------------------------------------------------------------------------- /shared/meta-social.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectionName": "components_shared_meta_socials", 3 | "info": { 4 | "displayName": "metaSocial", 5 | "icon": "project-diagram", 6 | "description": "" 7 | }, 8 | "options": {}, 9 | "attributes": { 10 | "socialNetwork": { 11 | "type": "enumeration", 12 | "enum": [ 13 | "Facebook", 14 | "Twitter" 15 | ], 16 | "required": true 17 | }, 18 | "title": { 19 | "type": "string", 20 | "required": true, 21 | "maxLength": 60 22 | }, 23 | "description": { 24 | "type": "string", 25 | "maxLength": 65, 26 | "required": true 27 | }, 28 | "image": { 29 | "allowedTypes": [ 30 | "images", 31 | "files", 32 | "videos" 33 | ], 34 | "type": "media", 35 | "multiple": false 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /shared/seo.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectionName": "components_shared_seos", 3 | "info": { 4 | "displayName": "seo", 5 | "icon": "search", 6 | "description": "" 7 | }, 8 | "options": {}, 9 | "attributes": { 10 | "metaTitle": { 11 | "required": true, 12 | "type": "string", 13 | "maxLength": 60 14 | }, 15 | "metaDescription": { 16 | "type": "string", 17 | "required": true, 18 | "maxLength": 160, 19 | "minLength": 50 20 | }, 21 | "metaImage": { 22 | "type": "media", 23 | "multiple": false, 24 | "required": true, 25 | "allowedTypes": [ 26 | "images", 27 | "files", 28 | "videos" 29 | ] 30 | }, 31 | "metaSocial": { 32 | "type": "component", 33 | "repeatable": true, 34 | "component": "shared.meta-social" 35 | }, 36 | "keywords": { 37 | "type": "text", 38 | "regex": "[^,]+" 39 | }, 40 | "metaRobots": { 41 | "type": "string", 42 | "regex": "[^,]+" 43 | }, 44 | "structuredData": { 45 | "type": "json" 46 | }, 47 | "metaViewport": { 48 | "type": "string" 49 | }, 50 | "canonicalURL": { 51 | "type": "string" 52 | } 53 | } 54 | } 55 | --------------------------------------------------------------------------------