strapi-html-migration
v1.0.2
Published
CLI tool to migrate HTML-based CMS content into Strapi
Maintainers
Readme
strapi-html-migration
A CLI tool to migrate HTML / CMS-exported content into Strapi, with automatic HTML-to-richtext conversion and migration reporting.
Prerequisites
- Node.js ≥ 18
- Access to a running Strapi instance
- Migration API endpoint available
- Basic knowledge of JSON / CMS exports
Installation (No Global Install Required)
You do not need to install anything globally.
Use npx:
npx strapi-html-migration migrate ./blogs
## project-root/
├── blogs/
│ ├── blog-1.json
│ ├── blog-2.json
│ ├── blog-3.txt
## Create a .env file in the directory where you run the command:
MIGRATION_API_URL=http://localhost:0000
API_URL=/api/api_name
## Expected JSON structure
# {
# "data": {
# "item": {
# "id": "UNIQUE_ID",
# "name": "blog-slug",
# "fields": [
# {
# "name": "Title",
# "value": "Blog Title"
# },
# {
# "name": "Introduction",
# "value": "Short introduction text"
# },
# {
# "name": "Content",
# "value": "<h2>Heading</h2><p>HTML content...</p>"
# }
# ]
# }
# }
# }