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

Preview the document URL with the slug within the studio #87

Open
fpuglap opened this issue Sep 14, 2023 · 1 comment
Open

Preview the document URL with the slug within the studio #87

fpuglap opened this issue Sep 14, 2023 · 1 comment
Labels

Comments

@fpuglap
Copy link

fpuglap commented Sep 14, 2023

I'm embeding sanity studio inside a Next.js app (app router). The problem I am facing is that while previewing in production I have not been able to set the URL correctly within the studio.

image

I am using this plugin to do it https://www.sanity.io/plugins/iframe-pane.

Within the options it is possible to configure the URL to which it must redirect to preview the document.

image

I would like to configure the URL so that it detects if I am local or in production, and if it is a document with slug or home.

There is a way to do this?

Any documentation will be helpful too, but unfortunately I haven't found this.

Thanks in advance!

@fpuglap
Copy link
Author

fpuglap commented Sep 14, 2023

I created this repo by following this guide https://www.sanity.io/guides/nextjs-app-router-live-preview in order to have this feature and solve this issue.

https://github.com/fpuglap/nextjs-app/tree/main

@stipsan stipsan transferred this issue from sanity-io/preview-kit Nov 17, 2023
@stipsan stipsan added the triaged label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants