Anyone used ghost content api?

I created a blog a long time ago in ghost, which is great, but the site is more than a blog. Everything BUT the blog is in Middleman with content that changes often in Contentful. Going forward, I want the blog in Contentful to just keep everything in one place.

I found an old repo that would transfer content from ghost > contentful, but that repo is unmaintained and no longer works.

Ghost allows you to export json, but all your posts are put into one huge json file which is too big to even view (in Atom). I have some options:

  1. I can use ghost content api to pull in ghost content. I’m not a js expert, but I’ve gotten it to kind of work.
    console.log(post.title);
    or
    document.getElementById('posts').innerHTML = '<li>' + post.title + '</li>';
    However, just thinking about paginating and indexing this makes me want to vomit.
  2. I can somehow port all content from ghost to contentful (not sure how as one json file isn’t going to cut it).
  3. I can somehow split this huge json file to several and then use them as local data (preferred)

Does anyone have experience with this? Maybe someone can point me in the right direction.

I don’t have experience nor with Ghost neither Contentful :slight_smile: but I guess, if you want to work in Contentful, there is no other way than import this data to their system, right? This makes point 3 invalid. Or am I missing something?

How your data is structured? If it’s a blog, then I guess you have one huge “database table” posts so no possibility to make several separate data-files? I’m not sure why you’re worrying about paginating and indexing – this should be done by Middleman, once you feed the data in?

The way middleman-contentful works is that it just pulls your contentful stuff into your data folder as json. As far as I can tell, middleman-blog does not work with stuff in the data folder (json files, no frontmatter, etc.). Because middleman-blog is off the table, paginating and stuff becomes a concern.

Ah, yes, good point. But this makes the idea of using Contentful and Middleman for an ongoing blog development – somehow less appealing…