How to get post in markdown instead of html?

  • What’s your URL? : Private
  • What version of Ghost are you using? Latest

I am trying to the setup of a blog with Ghost and Nextjs following this guide

Currently following this section i get post data in HTML , is it possible to get it in the format of markdown instead?

Ghost internally uses mobiledoc to store posts, so it’s not really feasible to get a markdown version of a post. This is because Ghost supports things like Bookmark cards and Gallary cards which don’t translate to markdown.

I’ve seen people use an HTML to markdown converter as part of their headless pipeline, but I think your best bet is to use the HTML that Ghost provides and style it :)

1 Like

Thanks a ton got it

Wanted it in markdown as I wanted to use next-mdx-remote and some custom remark plugins.

HTML → markdown seems like a viable solution. :innocent:

Thank you for the great content. sharing all this wonderful info

Thanks for sharing

which HTML → markdown library did you use?
I tried turndown , it works fine for normal HTML but it’s failing to retain custom jsx components tags…

same here , doesn’t work with mdx , and code blocks so dropped the plan ;(