Note: I’m not asking for help. I’m asking about documentation.
As I’ve continued getting my custom Blogger migration scripts working, I’ve repeatedly bumped into constraints that have differed from existing examples, and that don’t seem to be supported or refuted by what seems to be the relevant Ghost documentation.
The first I learned of it was from reading the medium_to_ghost code on GitHub, from which I inherited some format patterns that caused me issues down the line:
I eventually discovered that the format is at least somewhat documented on the Ghost-to-Ghost migration page (How to migrate data from Ghost to Ghost), but that’s also not complete — it doesn’t mention that the ZIP file can contain JSON, for instance.
I’m perfectly capable of reading the Ghost source code and figuring things out that way, but it’s slow. Is there more complete documentation anywhere around what file formats Ghost can import?
Thanks very much for this! It’s a pity that 4 years on and the documentation still hasn’t been updated. I’m currently working on an import from Tumblr’s export format and working backwards from Ghost-generated JSON is tedious and really shouldn’t be necessary. There is already a script for exporting directly from Tumblr, but it needs updating, and working the export is easier.
Key Points:
Tumblr exports images without a timestamp which can cause problems when zipping them. Use find media/* > touch to fix that.
Tumblr exports images to /media. If you want to keep this path, then the src for the images needs to be __GHOST_URL__/content/images/media. Note, this won’t trigger any optimisation, etc. but at least you’ll see your images after import.
If you have access to the file system of your Ghost site, then you can avoid using the import function for images and simply the media folder in content/images or adjust as necessary.
If there’s interest I’ll provide the code I’ve come up with.