How to use Prismic with Next.js 13 App Router

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 12

  • @jcnesci
    @jcnesci ปีที่แล้ว

    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

    • @Prismic
      @Prismic  ปีที่แล้ว

      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

  • @thomas-sinkala
    @thomas-sinkala 7 หลายเดือนก่อน +2

    Probably best to use VS code standard file manager, it makes following along easier.

  • @sntiagomoreno
    @sntiagomoreno ปีที่แล้ว

    How do you fetch linked content data from relationship fields correctly within slices using this version of Next?

    • @Prismic
      @Prismic  ปีที่แล้ว +1

      Hey! Check out the docs on fetching linked data here: prismic.io/docs/fetch-data-nextjs#fetch-linked-data

  • @jeremytenjo
    @jeremytenjo ปีที่แล้ว +2

    Prismic + Nextjs = ❤

  • @Boutbn
    @Boutbn ปีที่แล้ว

    Anyone else getting errors..? This tutorial is not working for me.

    • @angeloashmore2518
      @angeloashmore2518 ปีที่แล้ว

      What kind of errors are you getting? If it can't fit here, you can post a question in the Prismic community forum.

    • @Boutbn
      @Boutbn ปีที่แล้ว

      @@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

    • @angeloashmore2518
      @angeloashmore2518 ปีที่แล้ว

      ​@@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. 🙂

  • @xeon789
    @xeon789 ปีที่แล้ว

    WHY PRISMIC WHEN WE ALREADY HAVE MONGO DB. PLEASE LET ME KNOW THANKS IN ADVANCE.❤. NICE VIDEO

    • @Prismic
      @Prismic  ปีที่แล้ว

      Mango DB requires you to make DB queries. With Prismic you can have a UI to edit your content