Overview:
The Strapi plugin, Revalidate Button, is designed to solve the problem of manually running a webhook to update content in the Preview of a Next.js page. This plugin allows users to press a button called “Revalidate” after previewing their content and being sure of the changes. By manually referring to the page, the new content is updated. The button retrieves the link from Strapi’s webhooks by adding a line called “Revalidate”. It is recommended to enable the trigger of the Webhooks only for publishing or unpublishing content.
Features:
- Manual Revalidation: Users can manually revalidate the updated content in the Preview by pressing a button called “Revalidate”.
- Next.js Integration: This plugin is specifically designed to work with Next.js, allowing users to manually refer to the Next.js page to update the content.
- Webhook Integration: The button retrieves the link from Strapi’s webhooks, ensuring seamless integration and content updates.
Installation:
To install and enable the Revalidate Button plugin, follow these steps:
- Open the
plugins.jsfile. - Enable the plugin by adding the relevant configuration code.
- Access the Webhook configuration.
- Add a new line called “Revalidate” in the Webhook configuration.
- Save the changes.
Summary:
The Strapi plugin Revalidate Button provides a solution to the lack of manual run functionality in Strapi’s webhooks. By allowing users to manually revalidate the updated content in the Preview, it ensures that only the finalized and verified content is updated in the Next.js page. With easy installation and integration with Strapi’s webhooks, the Revalidate Button plugin enhances the user experience and content management process.