Setting Up Studio Preview to Take Multiple URLs
<https://ignite-gnist-toolbox.vercel.app/about>if (document.type === 'foo') {
return BASE_URL + '/path/to/page'
}
if (document.type === 'bar') {
return BASE_URL + '/page/to/other/page'
}export default function resolveProductionUrl(document) {
if (document.type === 'tools') {
return `<https://ignite-gnist-toolbox.vercel.app/tools/${document.slug.current}>`;
}
if (document.type === 'about') {
return `<https://ignite-gnist-toolbox.vercel.app/about>`
}
}_type
Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.