So this is not something broken in Ghost itself but something I broke by myself.
I migrated my blog from Wordpress to Self-hosted Ghost and the content was really ill-shaped. The only option was to manually go to each post and fix it. I tried for many of my posts; though it was getting tiring.
Then I realized; it’s all in DB, so OI started writing small queries to replace certain pieces in MobileDoc column in posts.
I learned that I should have not done it.
Now the Konig editor fails to render as the mobile doc kit in vendor.js is throwing errors.
Now I have no option but to find a way to fix the mobiledoc. In the end, it’s gonna take very very long then it would have taken to go and fix each post.
I am seeking some suggestion from the Editor developers here about what can be done to resolve it a bit more faster.
Few ways I can think of are
convert the post to mobiledoc and save it again
validate the mobiledoc and find out what’s broken and fix it in the same way it was broken
TBH, I thought I would need to recreate my site because of this issue. Though I am also glad that the fix was simple.
Validator is really great idea. I checked all the docs for mobiledoc and it is so hard to follow it, as it is based on Array index rather than keys.
Then I was thinking, what if there is similar mobiledoc with keys rather than array index. And no specific assignment for 0 for atom and 1 for card etc. but being more explicit JSON definition/schema to build the content.