Migrate an HTML blog to Ghost


#1

Hi!

I have an old blog that I would like to migrate to Ghost. My blog post pages are pure HTML with images. I have two questions.

  1. Does Ghost support HTML so that I simply copy-paste my HTML to Ghost?
  2. Can I write a script to copy all my posts to Ghost to avoid doing that manually one by one?

Thanks


Backdating posts
#2

if you go to Labs and enable Koenig editor you’ll see that when you write a new story, it does indeed support inserting HTML

don’t know about 2nd


#3
  1. Yes, ghost supports HTML. With the new editor, you can even take rich content (i.e. content with headings, boldface, italicized, etc.) and paste it in, and the editor will clean it up for you

  2. Yes, you can. There are two options for this - creating a custom export and importing that into Ghost, or using the private (undocumented) write API to insert them into an existing Ghost instance

Ghost saves posts in the mobiledoc format, and internally converts that mobiledoc to html. Here’s the template to use:

{"version":"0.3.1","atoms":[],"cards":[["html",{"html":"HTML_GOES_HERE"}]],"markups":[],"sections":[[10,0],[1,"p",[]]]}

#4

If that write API is undocumented, how can I learn to use it?


#5

The best way to figure out how to use the private API is reading the private API information section in the API docs (so you get a better understanding of the core concept), and inspecting network traffic (using your browser’s developer tools) as you go through the actions of creating a test post


#6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.