Static Generator

Generate a static website serve by github pages, apaches with one command or via the admin.

Install

composer require pushword/static-generator

That's it ! If you have a custom installation (not used the default installer),you may have a look inside vendor/pushword/admin/install.php.

Configure

Add in your current config/package/pushword.yaml for an App or globally under pushword_static_generator:

pushword:
  # ...
  static_generators: apache|github|frankenphp|[..., classNameGenerator, ...]
  static_symlink: true
  static_dir: '' #default /static/%mainHost.tld%/

The default generators are compatible with Apache/Litespeed and FrankenPHP/Caddy (generating .htaccess and Caddyfile).

Command

# Generate all apps
php bin/console pw:static:generate

# Generate 1 app
php bin/console pw:static:generate $host

# (re)Generate only one page
php bin/console pw:static:generate $host $slug

Using FrankenPHP (Caddy) to serve your static website

You must import the generated static/example.tld/.Caddyfile in your main Caddyfile.

If you still use the default Caddyfile (from pushword/skeleton), see the last commented part :

import static/example.tld/.Caddyfile