Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module generates static HTML versions of individual Drupal nodes to improve website performance and reduce server load. It allows for manual or bulk generation, automatic redirects for anonymous users, and manages included assets and permissions.

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
1 year ago
Releases (12 mo)
0 ▼ from 12
Maintenance
Dormant

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