Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences โ†’

If I'm not getting the 'Preview' option on sanity studio that probably means that I haven't setup previewmode correctly on my project right?

3 replies
Last updated: Oct 19, 2020

Hey, just a quick question. If I'm not getting the 'Preview' option on sanity studio that probably means that I haven't setup previewmode correctly on my project right?

Oct 19, 2020, 9:44 AM

Probably, you need to create a resolver function that takes a document and returns the URL, then register that function in sanity.json

https://www.sanity.io/docs/preview-content-on-site

Oct 19, 2020, 10:22 AM

Thanks ๐Ÿ˜›. I've done that but I'm most likely doing something wrong. Will try to get it working ๐Ÿ˜›

Oct 19, 2020, 10:23 AM

oof got it working. It was a mix of having a wrong projectid and a bit of difficulty of integrating the preview mode with Next.js

Oct 19, 2020, 10:59 AM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.