A CLI that imports data from ghost to contentful.
npm install -g contentful-ghost-importer
The CLI takes care of creating the necessary content types (Post, Tag, User) as well as of importing all posts, tags and users from the ghost export into Contentful.
contentful-ghost-importer -b <blogHost> -s <spaceId> -t <cmaToken> path/to/ghost-data.json
The following options are available:
Usage:
contentful-ghost-importer path/to/ghost-export.json
Options:
-s, --space-id The space id you want to import the data to. [required]
-t, --token A CMA access token. [required]
-b, --blog-host The host of the original blog. [required]
-h, --host The host you want to import the data to. [Default: "api.contentful.com"]
Before running the importer you will need to log into your ghost admin interface and download all your data as JSON file. You can find instructions about how to achieve that in the ghost support section.