Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web Previews]: "Live" preview when saving/publishing doesn't work #103

Open
vanska opened this issue Mar 14, 2024 · 1 comment
Open

[Web Previews]: "Live" preview when saving/publishing doesn't work #103

vanska opened this issue Mar 14, 2024 · 1 comment

Comments

@vanska
Copy link

vanska commented Mar 14, 2024

The Web Previews plugin documentations contains an example (cover video) where the preview instantly updates on save/publish but it doesn't seem to work and the editor needs to press the refresh icon after saving/publishing. Is this something the plugin should provide (e.g. reload the preview on save/publish) or do I need to somehow implement it myself?

@marcelofinamorvieira
Copy link
Contributor

Hello @vanska

To have live updates you need to use the Real Time Updates API https://www.datocms.com/docs/real-time-updates-api
That will update the page automatically upon an update in Dato.

If you'd like to see an example of the implementation of this API you can check this Demo right here: https://github.com/datocms/next-landing-page-demo/tree/main deployable here https://www.datocms.com/marketplace/starters/marketing-website

More specifically, you can see how we use the Real Time Updates API right here, for the draft pages: https://github.com/datocms/next-landing-page-demo/blob/64766f4e3787c688f7b5f6264c64e1910c85050b/components/Blog/RealTime/RealTimePost.tsx#L8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants