How to support gatsby preview with Ghost?

We are using Headless Ghost with Gatsby. We want to implement Preview with Gatsby. Any idea how we can add that into Ghost blogs?

I recently finished writing a tutorial on the topic. It’s split into three parts:

  1. Set up the environment
  2. Implement the preview page
  3. Get ready for production

Don’t hesitate to ask me if you have any questions!

I think you can avoid the extra network request by using [asset].browse with a filter instead of using [asset].read:

const browseParams = {
  filter = `uuid:${post.uuid},
  formats: 'html'
1 Like

Oh wow, I had no idea. Thank you very much for the tip! I’ll soon update it. Also, thank you for your time :slightly_smiling_face: Much appreciated!

1 Like