Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
contentful-to-sanity
Advanced tools
This package liberates Contentful spaces, creating Sanity projects and schemas as it goes.
npm install -g contentful-to-sanity
Requires node.js version >= 7.6
Install the CLI tool (see Installation above)
Install the Sanity CLI tool (if not already done) and log in
npm install -g @sanity/cli && sanity login
Open Contentful and navigate to your space: https://app.contentful.com/
Find the contentful space ID of your project (under Space settings → General)
Create a content management token (under Space settings → API keys → Content management tokens → Generate personal token)
Run the migration tool:
contentful-to-sanity --space <your-space-id> --contentful-token <your contentful token>
Usage
$ contentful-to-sanity
Options
-s, --space <spaceId> Contentful space to migrate
-p, --project <projectId> Sanity project ID to import to
-d, --dataset <dataset> Sanity dataset to import to
-o, --output <path> Path to create Sanity project in
-l, --locale <locale> Locale to migrate
-f, --from-file <file> Import from stored contentful export file
--sanity-token <token> Sanity token to authenticate with
--contentful-token <token> Contentful management token to authenticate with
--replace Replace documents in dataset if same IDs are encountered
--missing Skip documents that already exist
--keep-markdown Keeps markdown as-is. Converts to block content format by default.
--weak-refs Use weak references (allow import to continue on broken references)
--help Show this help
Examples
# Migrate contentful space "4cfSp4c3" with contentful token "d4t-t0k3n", prompt for info
$ contentful-to-sanity --space=4cfSp4c3 --contentful-token=d4t-t0k3n
# Migrate contentful space "4cfSp4c3" to sanity project "s4ni7yp" and dataset "staging"
$ contentful-to-sanity --space=4cfSp4c3 --project=s4ni7yp --dataset=staging
# Migrate from an exported file created by contentful-export CLI tool
$ contentful-to-sanity --from-file contentful.json --project=s4ni7yp --dataset=staging
Environment variables (fallbacks for missing flags)
--sanity-token = SANITY_IMPORT_TOKEN
--contentful-token = CONTENTFUL_MANAGEMENT_TOKEN
--keep-markdown
.MIT-licensed. See LICENSE.
FAQs
Migration tool from Contentful to Sanity
The npm package contentful-to-sanity receives a total of 39 weekly downloads. As such, contentful-to-sanity popularity was classified as not popular.
We found that contentful-to-sanity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 53 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.