Drupal is a registered trademark of Dries Buytaert

static_node

No security coverage
View on drupal.org

The Static Node Generator module improves performance by generating and serving static HTML versions of Drupal nodes. It reduces server load and significantly speeds up page load times for users. Ideal for content-heavy websites, it supports manual and bulk static file generation, automatic redirects, asset management, and granular permission control.

Features

  • Static HTML Generation: Generate static HTML versions of individual nodes and the homepage.
  • Automatic Redirect: Anonymous users are redirected to static pages when available.
  • Node Form Integration: Add a "Generate Static Page" button on the node edit form.
  • Bulk Actions: Generate or delete static content for multiple nodes from the content listing.
  • Asset Management: Automatically includes CSS, JavaScript, images, and other assets.
  • File List Page: Admin interface at /admin/content/static-files to manage generated static files.
  • Permission Control: Fine-grained permissions for generating and deleting static pages.
  • Cache Automation: Automatically clears relevant caches when static pages are created or deleted.
  • Configurable Static Folder: Choose the destination folder for static files (default: public://static).
  • Node Type Control: Enable static generation only for selected node types.

Post-Installation

  1. Enable the module via drush en static_node -y or through the UI.
  2. Configure permissions at /admin/people/permissions:
    • generate static node
    • delete static node
  3. Visit /admin/config/system/static-node to:
    • Select which node types support static generation
    • Set the static files folder path
  4. Manage generated files via /admin/content/static-files

Additional Requirements

  • Drupal 10 or 11
  • PHP 8.0 or higher (recommended)
  • Core modules: node, file

No third-party libraries are required. However, using Drush can streamline bulk generation via the command line.

Similar projects

Note: Unlike Tome, this module is not designed to statically export an entire Drupal site. Instead, it focuses on generating static versions of individual pages (nodes) on demand. This makes it perfect for use cases such as launching a campaign landing page expected to receive a sudden spike in traffic, allowing only selected content to be served as static for maximum performance and control—without compromising the rest of the site's dynamic capabilities.

Unlike full-site static generators, Static HTML Node focuses on individual nodes and integrates directly with the Drupal admin UI. It’s ideal for sites that need hybrid dynamic/static content delivery.

Supporting this Module

Maintained by Alberto Cocchiara (bigbabert). Contributions, feedback, and support are welcome via the Drupal project page.

Community Documentation

For usage examples and troubleshooting tips, see the README file and future community resources. Video walkthroughs and demos will be linked here when available.

Static Node Generator for Drupal 11 is built with Gen AI support from GitHub Copilot, using Agent mode with Claude 3.7 Sonnet.

Activity

Total releases
12
First release
Apr 2025
Latest release
10 months ago
Release cadence
1 day
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-beta11 Pre-release May 3, 2025
1.0.0-beta10 Pre-release May 2, 2025
1.0.0-beta9 Pre-release May 1, 2025
1.0.0-beta8 Pre-release Apr 28, 2025
1.0.0-beta7 Pre-release Apr 28, 2025
1.0.0-beta6 Pre-release Apr 28, 2025
1.0.0-beta5 Pre-release Apr 28, 2025
1.0.0-beta4 Pre-release Apr 28, 2025
1.0.0-beta3 Pre-release Apr 28, 2025
1.0.0-beta2 Pre-release Apr 24, 2025
1.0.0-beta1 Pre-release Apr 24, 2025
1.x-dev Dev Apr 24, 2025