DrupalX Standard
  • Overview
  • Development
    • Getting Started
      • Installation
      • Setup
    • Theming with DrupalX
    • DrupalX Static
  • Managing Content
    • Building with Paragraphs
  • External Links
    • DrupalX Gitbook Github
    • DrupalX Storybook
    • DrupalX Drupal.org
Powered by GitBook
On this page
  1. Development

DrupalX Static

PreviousTheming with DrupalXNextBuilding with Paragraphs

Last updated 6 months ago

Exporting DrupalX to Static Files with the Tome Module

The Drupal Tome module enables the export of DrupalX sites to static files. Detailed instructions can be found on the .

Example Usage

Follow these steps to set it up DrupalX with Tome:

  1. Add Tome to Composer

    Add the latest development version of Tome (compatible with Drush 12) to your project:

    composer require drupal/tome:1.x-dev
  2. Enable the Tome Static Module

    Enable the Tome static module using Drush:

    ddev drush en -y tome_static
  3. Export the Site Using Drush

    Export your site to static files:

    ddev drush tome:static --uri=https://yourproductionurl --path-count=1 --process-count=1
  4. Navigate to the HTML Directory

    Change to the /html directory:

    cd html
  5. Deploy to Netlify

    Deploy the static site to Netlify. For optimal results, set the process count and path count to 1. This avoids issues with the active menu link not appearing correctly:

    netlify deploy --site yoursitename --prod
  6. Configure URLs on Netlify

    Turn off pretty URLs in Netlify under the "Build & Deploy" configuration. This prevents Netlify from adding a trailing '/' character to URLs.

By following these steps, you can effectively export your DrupalX site to static files and deploy them to Netlify, ensuring a fast and reliable static site experience.

Tome documentation site