diff --git a/docs/how-to-guides/webiny-applications/headless-cms/content-model-plugins.mdx b/docs/how-to-guides/webiny-applications/headless-cms/content-model-plugins.mdx index a44576547..2f368efe5 100644 --- a/docs/how-to-guides/webiny-applications/headless-cms/content-model-plugins.mdx +++ b/docs/how-to-guides/webiny-applications/headless-cms/content-model-plugins.mdx @@ -113,11 +113,33 @@ export default [ ]; ``` -:::info -Do note that you will also need to import the newly created [`api/code/headlessCMS/src/plugins/models.ts`](https://github.com/webiny/webiny-examples/blob/master/headless-cms/content-model-plugins/basic/api/code/headlessCMS/src/plugins/models.ts) file and register the created plugins in the [`api/code/headlessCMS/src/index.ts`](https://github.com/webiny/webiny-examples/blob/master/headless-cms/content-model-plugins/basic/api/code/headlessCMS/src/index.ts#L42) entrypoint file. -::: +Now head to [`api/code/headlessCMS/src/index.ts`](https://github.com/webiny/webiny-examples/blob/master/headless-cms/content-model-plugins/basic/api/code/headlessCMS/src/index.ts#L42) and register the new plugins. + +```ts title="api/code/headlessCMS/src/index.ts" +... + +// Importing custom plugins +import customModels from "./plugins/models" + +... + +export const handler = createHandler({ + plugins: [ + ... + customModels + ], + http: { debug } +}); + +``` + +Finally don't forget to redeploy the headlessCMS app, by running (change then ``env`` value accordingly): + +```console +yarn webiny deploy api/headlessCMS --env dev +``` -Once registered, we should end up with the following two items in our Admin Area main menu: +Once registered and deployed, we should end up with the following two items in our Admin Area main menu: