#Embedded sanity project in Nextjs

12 messages · Page 1 of 1 (latest)

silk gulch
#

If anyone has worked with this recently. How do I deploy sanity schemas when sanity is embedded? sanity deploy does not work

hasty auroraBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

tired fiber
#

you do not use sanity deploy with embedded or self-hosted projects, it is only for their free/built-in hosting

#

basically you just navigate to the route where the embedded version is and it just works

silk gulch
tired fiber
#

you need to install it in your Next project, like if you use npm npm install --save @sanity/vision

#

then this will work in sanity.config.js import {visionTool} from '@sanity/vision'

hasty auroraBOT
#
✅ Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer
near yew
#

Hi @silk gulch!
After you have deployed your next app with Sanity embedded, are you able to to visit Sanity Studio endpoint?

silk gulch
near yew
#
const config = defineConfig({
  projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID as string,
  dataset: process.env.NEXT_PUBLIC_SANITY_DATASET as string,
  title: 'testing-1',
  apiVersion: '2023-09-13',
  basePath: '/admin',
  plugins: [deskTool(), visionTool()],
  schema: { types: schemas },
});
export default config;

The endpoint I mean is the basePath

#

Are you able to start you Studio when you go to your basePath on your deployed version ?