Kirby/JSON Sanity Content Migration
For the relaunch of one of our clients we switched the content management system from Kirby to Sanity. In our case the old CMS was still running on Kirby 2 which does not provide any kind of API.
In our case we had to process projects with simple text and an image gallery from a portfolio website. The script consists of several async functions to
- Create the Sanity document
- Fill in all basic information (Title, Text)
- Download all images from the project
- Upload all images to Sanity
- Connect the uploaded images with the image gallery/array
You can find the a sample setup with Kirby and Sanity example, plus the script in our GitHub Repo.