Skip to content

Latest commit

 

History

History
executable file
·
60 lines (49 loc) · 1.94 KB

File metadata and controls

executable file
·
60 lines (49 loc) · 1.94 KB

Contentstack import utility

Contentstack is a headless CMS with an API-first approach that puts content at the centre. It is designed to simplify the process of publication by separating code from content.

This tool helps you to import content which is exported using contentstack-export utility into another stack.

Installation

Download this project and install all the modules using following command.

$ npm install

Configuration

Update configuration details at config/index.js

{
 master_locale: {
  name: '', // Stack's master locale. ex: 'English - United States'
  code: ''  // Stack master locale's code. ex: 'en-us'
 },
 email: '', // Your registered email id
 password: '', // Account password
 target_stack: '', // Stack api_key. This is the stack, where the data will be imported
 data: '' // The data that's to be exported. This is generally the one exported via the contentstack-export utility. ex: '../contentstack-export/contents'. Kindly provide the relative path to the directory

Usage

Once all things are configured, you can run following commands

  1. Import all modules [ assets, locales, environments, extensions, webhooks, global_fields, content_types, entries ]
$ npm run import
  1. Import a specific module
$ npm run import-assets
$ npm run import-locales
$ npm run import-env
$ npm run import-extensions
$ npm run import-webhooks
$ npm run import-globalfields
$ npm run import-contenttypes
$ npm run import-entries

Note: Before importing entries you must have to import locales, assets and content types.

Known Limitations and Issues

  • It will migrate only latest published version of entry.
  • Does not support the following
    • Roles
    • Users
    • Releases
    • Workflow
  • If 2 different versions of the same asset have the same file name, only the 1st version will be imported

License

This project is licensed under MIT license