Primarily in an attempt to economize and because my sites are largely not interactive, I decided to run them as static sites. My production sites are on Upsun. I like Upsun. In order to do this, it was suggested I try out Drupal’s module tome. It serves my purpose very well, though I still miss the interactive search function.
My local development uses ddev and drupal 11. I added supercronic to ddev and use it to generate static site code nightly. Initially I cloned my original code to a new ddev project and added the tome module. I also created a new git repository for this project.
After tome generates a static version, it can be previewed before it is exported. When I am satisfied with whatever new content and/or code has been added, the generated code is exported to a gzip file. I create a second new project, not in ddev, and initialize a new git repository for this static code. Upsun requires git. Before I push this site to Upsun I try it out on my local Apache server.
One trick about Upson is to create a new production project and modify the config.yaml file. I found no documentation on this but thanks to support from Upsun I have this:
applications:
[PROJECT NAME]:
type: php:8.4
web:
commands:
start: sleep infinity # static site — no need to run PHP
locations:
/:
root: ""
index:
- index.html
scripts: false
allow: true
passthru: false