Skip to content

The idea here is to use Nextjs SSR mode to implement Live Preview. Using Stack.LivePreviewQuery SDK to pass the query params which we get from getServerSideProps().

License

Notifications You must be signed in to change notification settings

contentstack/live-preview-next-js-ssr

Repository files navigation

Next.js SSR with Contentstack Live preview

How to use

  1. Create one entry with title and single_line field.
  2. create next.config.js using the next.config.sample.js
  3. Run the project within Contentstack

What have we done

The idea is to use the SSR documentation for the live preview. We moved the ContentstackLivePreview.init() at the utils.js where we have initialized the Contentstack. Then, we have used the Stack.livePreviewQuery and passed the query param to it. We got the query param from the prop of getServerSideProps().

About

The idea here is to use Nextjs SSR mode to implement Live Preview. Using Stack.LivePreviewQuery SDK to pass the query params which we get from getServerSideProps().

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published