Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Static Node Generator - How to use and Use cases

Last updated on
28 April 2025

Static Node Generator is a Drupal module that allows administrators to generate and serve static HTML versions of specific nodes. This improves performance by reducing server load and speeding up response times for high-traffic content.

🧩 How It Works

The module adds buttons, bulk actions, and admin screens to let you easily manage static file creation, updates, and removal for any enabled content types. It also handles asset inclusion and cache management automatically.


⚙️ Settings Overview

1. Static Node Generator Settings

Static Node Generator Settings page
Available at: /admin/config/system/static-node

  • Select which content types support static page generation.

  • Optionally purge static files when the original node is deleted.

  • Set the destination folder (relative to public://) where static HTML output is stored.


2. Generate Static Page from Node Form

Static Node Generator Settings page

From the node edit form, a button lets you manually generate or update the static version of the page.


3. Bulk Static Page Generation

Bulk static generation

From the content listing page (/admin/content), select multiple nodes and apply the "Generate Static Page" bulk action to build static versions all at once.


4. Row Operations for Static Generation

Operations per row for static node actions

Use the dropdown actions next to each node in the admin list to quickly generate or delete static files without opening the node.


5. Static Files Management Page

Admin list of static HTML files
Available at: /admin/content/static-files

  • View all generated static files.

  • Filter by content type or title.

  • Regenerate, delete, or view files.

  • Generate static homepage with a single button.


💡 Use Cases

📈 Campaign Landing Page Optimization

Launching a marketing campaign that will drive heavy traffic to a landing page?
Use Static Node Generator to pre-render the page so thousands of users are served a fast, static version instantly—saving backend resources.


📰 News Publishing with CDN Cache

Running a news site with a CDN?
Use static files to push important stories to the edge instantly. Editors can generate or regenerate static pages at any time to reflect breaking news.


🎯 Selective Static Content in Hybrid Sites

In hybrid sites with both dynamic and static needs, use this module to statically serve specific node types like “Case studies” or “Basic pages”, while user-driven content remains dynamic.


➡️ Get started:
Install the module, configure content types, and generate static files from the node form, content list, or the admin overview page.

Help improve this page

Page status: No known problems

You can: