Overview
Icon for Contentful

Contentful

Create and manage dynamic content with Contentful

Contentful

Manage the content of your storefront with rich Content Management System (CMS) capabilities using Contentful.

Contentful Plugin Documentation | Medusa Website | Medusa Repository

Features

  • Handle the presentational content of your commerce application using Contentful.
  • Two-way sync between Medusa and Contentful, allowing you to manage products details consistently.
  • Benefit from Contentful's advanced CMS features such as localization and versioning.

Prerequisites

How to Install

1. Run the following command to install a new Medusa server configured with Contentful:

medusa new medusa-contentful https://github.com/medusajs/medusa-starter-contentful

2. Change to the newly created directory Copy to clipboardmedusa-contentful:

cd medusa-contentful

3. Set the following environment variables in Copy to clipboard.env:

CONTENTFUL_SPACE_ID=<YOUR_CONTENTFUL_SPACE_ID>
CONTENTFUL_ACCESS_TOKEN=<YOUR_CONTENTFUL_ACCESS_TOKEN>
CONTENTFUL_ENV=<YOUR_CONTENTFUL_ENV>
REDIS_URL=<YOUR_REDIS_URL>
DATABASE_URL=<YOUR_DB_URL>

4. Migrate the content types into Contentful with the following command:

npm run migrate:contentful

5. Seed Contentful with demo content data using the following command:

npm run seed:contentful

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

npm run start

2. You can then setup the Gatsby Contentful Storefront, or connect to Contentful from your own storefront to retrieve content data.

Additional Resources

You may also like

Browse all integrations

Build your own

Develop your own custom integraiton

Build your own integration with our API to speed up your processes. Make your integration available via npm for it to be shared in our Library with the broader Medusa community.

gift card interface

Ready to build your custom commerce setup?