I’m trying to modify the jekyll to ghost importer to import my old jekyll site to Ghost 2.0 successfully. I’ve gotten pretty close to being successful. Right now, this is what my JSON export looks like:
{
"data": {
"posts": [
{
"author_id": 1,
"created_at": 1305004800000,
"created_by": 1,
"feature_image": null,
"featured": 0,
"id": 0,
"language": "en_US",
"meta_description": null,
"meta_title": null,
"mobiledoc": {
"atoms": [],
"cards": [
[
"markdown",
{
"cardName": "markdown",
"markdown": "# Hello\nWorld"
}
]
],
"markups": [],
"sections": [
[
10,
0
]
],
"version": "0.3.1"
},
"page": 0,
"published_at": 1305004800000,
"published_by": 1,
"slug": "first-post",
"status": "published",
"title": "first post",
"updated_at": 1305004800000,
"updated_by": 1
}
],
"users": [
{
"accessibility": null,
"bio": null,
"cover_image": null,
"created_at": 1537235410000,
"created_by": 1,
"email": "email@gmail.com",
"id": 1,
"language": "en_US",
"last_login": null,
"location": null,
"meta_description": null,
"meta_title": null,
"name": "name",
"profile_image": null,
"slug": "name",
"status": "active",
"updated_at": 1537235410000,
"updated_by": 1,
"website": null
}
]
},
"meta": {
"exported_on": 1537235410000,
"version": "2.1.0"
},
"posts_tags": [],
"tags": []
}
This successfully creates a new post with the correct title, but the body and content of the post is blank:
What is wrong with my mobiledoc structure? Is there more documentation on what exactly the JSON format needs to be to import posts? The documentation on the importer is pretty light.
Asked another way - how am I supposed to pass the content of the post in JSON? I’ve tried through html
, markdown
, and now mobiledoc
keys in posts
and they all end up creating a post with the title and an empty body.
- What version of Ghost are you using? 2.1.0
- What configuration? One click install on digital ocean → Upgraded to 2.1.0
- What browser? Chrome
- What errors or information do you see in the console? None
- What steps could someone else take to reproduce the issue you’re having?