How to get MobileDoc document?

According to all documents are stored in MobileDoc. I might not be looking in the right place but I don’t seem to see any way to get the actual mobile doc. The content API returns back an HTML node but I want the MobileDoc.

Edit: I found it over in the Admin API:

Seems like an odd place for it. I would like it to be in the Content API specifically so I can use a document indexer with the MobileDoc version of the document to insert pages into a search index (without using an admin token).

1 Like

I too would like to know if there is a reason that MobileDoc version of the page is not available from the v3 content API.

I am building a VueJS front-end to my blog and it would be useful ( and required for some card rendering ) to be able to render the MobileDoc directly using Vue components. Is there any way around this limitation without having to use and admin token ( which is obviously not possible for the user-facing frontend that I’m designing )?

The documentation here specifically states the use-case of parsing the content to render on the web, but in its current state it is only useful to parse and render if you are building a static site, or you have admin access to the site:

Because MobileDoc is Just JSON ™️, it’s extremely portable and can be transformed into multiple formats. This is particularly powerful because it’s just as easy to parse your content into HTML to render on the web as it is to pull the same content into a mobile app using completely different syntax.

My exact use-case is the need to convert image gallery cards to a JavaScript carousel. Currently ghost gives me a specific HTML representation of the image gallery, but I want to take the image data and create my own Vue component data from it, which without mobiledoc would mean parsing the HTML to extract the data, or just foregoing the carousel and using CSS.

1 Like

@elijahsgh I created a new feature request over here if you want to vote for it. :slight_smile:

1 Like