DEV Community

Discussion on: Using Next.js Preview mode with Strapi CMS

Collapse
 
lordalaqua profile image
Lorenzo Dal'Aqua

Hi! Great post, this was exactly what I was trying to do. Your post helped me understand how to implement this in Strapi and NextJS.

It seems the documentation and examples on adding plugins and modifying the admin dashboard in Strapi are a little outdated right now, the developers appear to be changing how to do this. I hope they have an official way to do this soon, it should be basic functionality in a headless CMS.

I ended up using an alternative that I found a bit easier to implement on the Strapi side. If you want to check it out, it's strapi-plugin-preview-content on NPM, it does mostly the same as the method you used, and has a interface in the CMS to customize the preview URL instead of adding it in code.

Anyway, thanks for the post! Cheers!

Collapse
 
dlw profile image
Darren White

Thanks for the kind words. I'll check out that plugin, I came across it my various searches online but was being stubborn and I wanted to solve it myself 😁

Looks like I'll be building a fairly large production website with Strapi, therefore, plenty of opportunities to go deep and get a better handle on the Strapi side of things

Thanks again,
Darren