Download the PHP package nassau/kunstmaan-static-site-bundle without Composer
On this page you can find all versions of the php package nassau/kunstmaan-static-site-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nassau/kunstmaan-static-site-bundle
More information about nassau/kunstmaan-static-site-bundle
Files in nassau/kunstmaan-static-site-bundle
Package kunstmaan-static-site-bundle
Short Description Export your Kunstmaan Bundles CMS website to static HTML files
License MIT
Informations about the package kunstmaan-static-site-bundle
Export your Kunstmaan Bundles CMS website to static HTML files
Installation
composer require nassau/kunstmaan-static-site-bundle
Configuration
Configure paths and files you’d like to export using symfony configuration. The below example is the default config:
Usage
Run nassau:static-site:dump file://target-directory
. The directory needs to exist.
This will export:
- all static files (from
web
dir) - all CMS pages
- Sitemaps and robots file
- Redirects added in the settings area as well
Customization
Storage backends
Only a simple FileSystemStorage
is provided. Create your own by implementing Nassau\KunstmaanStaticSiteBundle\Service\Dumper\Storage
interface and tagging your service in the container. The best use case for this would be Amazon S3 or FTP backend.
The method storeStaticSite
is called once for the whole site. This way you can export all files in a zip
or tar
archive.
Example
Now you can use this backend using random://
protocol: app/console nassau:static-site:dump random://tmp/static-site
Route Parameters Generators
Implement the Nassau\KunstmaanStaticSiteBundle\Service\Generator\RouteParametersGenerator
interface and tag your service in the container.
For example, here’s a fictional formats
generator that generates a separate url for each of three formats. When used,
given route will be exported three times, each time in different format.