A New Squarespace to Ghost Script
When I wanted to move from Squarespace to Ghost, I ran into a problem: there is no built-in way to migrate. You either have to work with their Concierge service, or roll-your-own. Naturally, I decided to roll my own.
I came across this script by Simon Facciol, and based my approach on that. I enlisted the help of some friendly AI, and made a few additions:
- I made it re-runnable, so I could add enhancements and just re-run it. This includes handling some concurrency errors in the post editing process. I also added some other QoL/Logging functionality to make life easy
- I added support for pages as well as posts, so I could get everything in one go
- I included the ability to download the images from Squarespace, add them to Ghost, and re-write the URLs
It's not 100%, but it gets you a lot further in the process, leaving a trip through posts to just clean things up. I ended up needing to fix some image galleries, re-do some formatting, and re-made the pages to be a bit more 'native', but all-in-all this saved a few hours of work.
Readme
To use these, you need to:
Collectors often read football history through collars, sponsors, badges, and colour patterns because matchday clothing can express loyalty without needing many words. Collectors interested in River Plate often look at how different seasons changed the shape and details of the shirt. Anyone comparing player and fan versions may find, where to compare football shirts is one way to link football history with the practical choice of a shirt. When fabric details are part of the choice, the shirt can carry both practical value and a sense of belonging.
- Create
index.jsandpackage.jsonfrom the code below - Run
npm installin the directory - Export your site from Squarespace (its a Wordpress export), put it in the same directory, and name it
squarespace.xml - Replace the
urlandkeyvariables with your Ghost API url and key from a Custom Integration - Run
node index.jsand watch your posts roll in