I am trying to get Live Preview functioning with SSR in NextJS. So far I been consulting these two resources:
- https://www.contentstack.com/docs/developers/set-up-live-preview/set-up-live-preview-for-your-website/
- https://github.com/contentstack/live-preview-next-js-ssr
I can’t seem to get the site to render preview content, let alone saved but unpublished content. I am not running the github example above but have employed a similar method in my NextJS site.
It is my understanding that for live preview to function it relies on the preview URL containing the necessary parameters to update the Stack object using Stack.livePreviewQuery(context.query). However though I have Live Preview enabled, I only ever see it call my site without adding any querystring, so I’m unsure how this can work.
I do have Live Preview working using the example NextJS repo, but this is based on client-side rendering.
Should SSR still work and is there something I’m perhaps missing?
Best answer by Sachin
View original