Contentful space management script
- Retrieve all contentTypes of space and save as json
- Upload local dir to contentful media
- JavaScript Library for Contentful's Content Management API
- contentful-management.js API Document
- Complete reference guide to the Management SDK
-
Insall Dependencies.
npm i
-
Create a .env by copying .env.example and update with your space credentials.
CONTENTFUL_SPACE_ID= CONTENTFUL_ACCESS_TOKEN= CONTENTFUL_MANAGEMENT_TOKEN=
-
Start script.
Get all space contentTypes and save as json
npm run get-types
Create a upload dir and copy files.
Run command to upload files to space.npm run upload