The guide assumes you’ll be starting from scratch, but you can start a new project using the GitHub repository as your base. You can clone the code and create a new Prismic repository with these commands: npx degit prismicio-community/nextjs-tutorial-app-router nextjs-tutorial-app-router cd nextjs-tutorial-app-router npx @slicemachine/init@latest Then go into Prismic and create the Settings and Homepage documents. We have a more in-depth tutorial here: prismic.io/blog/how-to-use-prismic-with-nextjs-app-router
@@angeloashmore2518 “Unsupported server component type” when trying to build my application on Vercel. I have almost the exact same code as you. The only thing I am missing is the cache rule with the .env options but your example does not contain a env.example sadly
@@Boutbn The example project doesn't use any .env files or environment variables on Vercel. Caching is controlled using the `fetchOptions` property in `prismic.createClient()`. If you post a message on the forum with the code that is causing the error, I or someone on the team can take a look. 🙂
Newbie here: Is there a way to copy the Prismic repository so I can create my own copy and continue from there? Or must I start from scratch? Thanks
The guide assumes you’ll be starting from scratch, but you can start a new project using the GitHub repository as your base. You can clone the code and create a new Prismic repository with these commands:
npx degit prismicio-community/nextjs-tutorial-app-router nextjs-tutorial-app-router
cd nextjs-tutorial-app-router
npx @slicemachine/init@latest
Then go into Prismic and create the Settings and Homepage documents.
We have a more in-depth tutorial here: prismic.io/blog/how-to-use-prismic-with-nextjs-app-router
Probably best to use VS code standard file manager, it makes following along easier.
How do you fetch linked content data from relationship fields correctly within slices using this version of Next?
Hey! Check out the docs on fetching linked data here: prismic.io/docs/fetch-data-nextjs#fetch-linked-data
Prismic + Nextjs = ❤
Anyone else getting errors..? This tutorial is not working for me.
What kind of errors are you getting? If it can't fit here, you can post a question in the Prismic community forum.
@@angeloashmore2518 “Unsupported server component type” when trying to build my application on Vercel. I have almost the exact same code as you. The only thing I am missing is the cache rule with the .env options but your example does not contain a env.example sadly
@@Boutbn The example project doesn't use any .env files or environment variables on Vercel. Caching is controlled using the `fetchOptions` property in `prismic.createClient()`. If you post a message on the forum with the code that is causing the error, I or someone on the team can take a look. 🙂
WHY PRISMIC WHEN WE ALREADY HAVE MONGO DB. PLEASE LET ME KNOW THANKS IN ADVANCE.❤. NICE VIDEO
Mango DB requires you to make DB queries. With Prismic you can have a UI to edit your content