Today marks my 2nd day with Ghost 😘 I spent nearly a whole night yesterday trying to figure out how to migrate from my current Jekyll site (hosted under Github pages). All my technical notes are stored there; I did think about moving my wordpress.com content over, but that's another story (I used to write a post about how to effectively extract information from WXR. In Chinese though). Nonetheless, it turned out to be a much challenging task.
My current Jekyll site. Simple yet powerful.
I have a good starting point: the unofficial plugin recommended on the migration guide. However, the script is seriously outdated (last updated 5 years ago); it's not surprising to find that it failed in multiple places.
Challenge 1: Run
This is for Windows 10 user only. As a ThinkPad user I really don't want to compromise and install Jekyll using some tricks. The official Jekyll docs provide another way out: using bash.
undefined method getConverterImpl'`
Challenge 3: Import error
See the screenshot below. I also noticed people reporting the same issue on the forum (not Jekyll, but we have the same symptom).
Looks like the workaround is to grab a Ghost 1.0 site on a Docker image. I don't know how to use Docker yet (willing to learn) but really don't want to go through the setup again (partially because my local machine is not Linux/Mac 😂). So... I spent some time diving into the guide again, and found what elements were missing.
- The fields required under
postwere changed. Especially the
- Existing script does not include any author information, which might exist if the user has specified
Initially, I would like to write another script using my favoriate language (Python, yes) to further process the generated JSON. But then I realized why not just modify the ruby file directly? And, FYI, last time I ever wrote any line in Ruby was back in Fall 2017. I can still read the code (somehow) but had no confidence in writing. Yet, I made a way to enhance the plugin so that it works for Ghost 2.0 import, and you can find the code and how to use it under my repo.
All my 8 posts were migrated successfully! Just a side note: when manually adding the author information, make sure that the
slug field has the same slug as you set in your current dashboard. That way, Ghost will automatically link the current users with all imported posts.
My site now with the two sample imported posts.
I still need to update the script so that it knows how to extract author info from Jekyll. If you have an idea how to do so, please let me know (have been trying different combinations with no luck)! Happy blogging & coding 😀😀😀