MageWork

Back to home

Static Site Generator

With the native static package, you can generate a static version of any package and serve the files directly.

MW_ENVIRONMENT={environment} bin/magework static build {package} {baseUrl}

For example, if your application contains a package named acme and you want to serve it at the URL https://www.example.com:

MW_ENVIRONMENT=default bin/magework static build acme https://www.example.com

If the URL is missing, pages will use "/" as the base URL and the site can be served on any domain.

The site is generated in the static/{package} folder, then you can configure the web server to use this folder as root directory.