Bootstrapping Contentful
Alokai ships with a set of Contentful Content Types matching our out-of-the-box frontend components. Here you will learn how to import them into your Contentful space.
Importing integration schemas locally
If you've followed one of the guides on setting up your frontend application, you should already be familiar with our CMS CLI. This time you will use it to copy Alokai schemas to your local machine so that you can upload them to your Contentful space later. From within your project, use the following command:
npx @vsf-enterprise/cms-cli contentful:schemas -u -f nuxt
If the command execution is successful, a new /schemas
directory will appear in your project:
└── schemas
└── schemas.json
The JSON file has been exported from Alokai's internal Contentful space. It contains the latest version of Content Type schemas meant to be used with the integration's frontend components.
Installing integration schemas in Contentful
The easiest way to import the schemas into your own Contentful space is using the CLI tool provided by Contentful:
contentful space import --space-id <your-space-id> --content-file ./schemas.json
A step-by-step guide explaining how to do it can be found here. Once done, the default Content Types should appear under the Content model tab in your Contentful space.