This project is not covered by Drupal’s security advisory policy.
This module works only for an application that has next.js as front-end framework. The goal is to inform next server to invalidate the cache and revalidate the page.
How-to
- composer require drupal/nextjs_revalidate
- drush en nextjs_revalidate -y
- Implement the hook_nextjs_revalidate_entity($entity) that makes the logic when an entity has been saved ()
if (
!$entity instanceof \Drupal\node\NodeInterface &&
!$entity instanceof \Drupal\menu_link_content\MenuLinkContentInterface
) {
return;
}
\Drupal::messenger()->addStatus(
t(
'Your change will be visible on the site in a few seconds.',
[],
['context' => 'nextjs_revalidate']
)
);
$queue = \Drupal::service('queue')->get('nextjs_revalidate_queue');
$queue->createItem($entity);
Supporting organizations:
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Developer tools
- Ecosystem: Next.js, Headless
4 sites report using this module
- Created by tsu on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
1.0.0-beta1
released 16 August 2023
Works with Drupal: ^8 || ^9 || ^10
Initial project push
Install:
