This document walks you through connecting your Contentful account to Cloudpress, allowing you to export content to Contentful.
Create a content type
Before you connect your Contentful account, you must create a Content Type for the content you wish to export if you have not already done so.
The Content Type must contain at least the following fields:
- One short text field configured as the Entry title. When exporting content, Cloudpress sets the value of this field to the title of the document.
- One rich text or long text. Cloudpress will export the document content to either a rich text or a long text field. For rich text fields, the content will be converted to the correct rich text format. For long text fields, the content will be converted to markdown.
You can see an example documentation content type defined in Contentful in the screenshot below. In this case, the field named Title will be used as the title of the document, and the Content field will be used for the document's content.
For more information, refer to the Contentful data model documentation.
Connect your Contentful account
You can connect your Contentful account by going to the Connections page in the Cloudpress application. Click on the Add Connection button, then click on Contentful.
Cloudpress will prompt you for the details of the new connection:
- The Connection name is the name that will uniquely identify this connection in Cloudpress.
- The Access Token is a Contentful Personal Access Token that will allow Cloudpress to communicate with your Contentful account. You can create a personal access token by going to Settings > API Keys in the Contentful dashboard. Navigate to the Content management tokens tab and click the Generate personal token button to generate a new token
Once you have completed the information, click on the Connect account button.
Your Contentful account is now connected to Cloudpress, but you will need to configure it properly before you can start exporting documents to it. Go to the Contentful Model tab on the connection detail page.
The following information must be supplied:
- Select the Contentful space to which you want to export content.
- Select the Content type that must be used for the content you wish to export
- For the Body field, select a field defined in the content type that must contain the actual content (or body) of the document. This field must be defined in Contentful as either a Rich Text or Long Text field.
- Optionally, specify a Locale you want to use when exporting documents to Contentful. If none is specified, the default locale for the space will be used.
Once you have completed the information, you can click the Save Changes button.