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.
Fuelled by caffeine, often builds websites with HTML, CSS and JavaScript (inc. React and Next.js). When I'm not being a dad or working I like to run.... allot.
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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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!
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