diff --git a/docs/docs/core/admin/link-strapi-design-system.md b/docs/docs/core/admin/link-strapi-design-system.md new file mode 100644 index 0000000000..31bdaca868 --- /dev/null +++ b/docs/docs/core/admin/link-strapi-design-system.md @@ -0,0 +1,25 @@ +# Linking the Strapi Design System + +Follow these steps to use a local version of the Strapi design system with the Strapi monorepo + +First, run `yarn build` in `strapi-design-system/packages/strapi-design-system` to generate the bundle. + +In your copy of Strapi, you can link the design system using either a [relative path](#relative-path) or [yarn link](#yarn-link). + +### Relative path + +Replace the version number in both `strapi/packages/core/admin/package.json` and `strapi/packages/core/helper-plugin/package.json` with the relative path to your copy of the design system: + +``` +"@strapi/design-system": "link:../../../../strapi-design-system/packages/strapi-design-system" +``` + +### Yarn link + +Alternatively, you can use [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/) by first running `yarn link` in `strapi-design-system/packages/design-system` and then `yarn link @strapi/design-system` in both `strapi/packages/core/admin` and `strapi/packages/core/helper-plugin`. With this approach, no changes need to be made to the `package.json` + +Once the link is setup, run the following command from the root of the monorepo + +``` +yarn lerna clean && yarn setup +``` diff --git a/docs/sidebars.js b/docs/sidebars.js index 6154e8ff2a..c7b203ad87 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -50,6 +50,17 @@ const sidebars = { }, ], }, + { + type: 'category', + label: 'Admin', + items: [ + { + type: 'doc', + label: 'Link Strapi Design System', + id: 'core/admin/link-strapi-design-system', + }, + ], + }, { type: 'category', label: 'Content Type Builder',