PHPackages                             nassau/kunstmaan-static-site-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nassau/kunstmaan-static-site-bundle

ActiveLibrary

nassau/kunstmaan-static-site-bundle
===================================

Export your Kunstmaan Bundles CMS website to static HTML files

0.2(9y ago)29[3 issues](https://github.com/mlebkowski/kunstmaan-static-site-bundle/issues)1MITPHP

Since Dec 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mlebkowski/kunstmaan-static-site-bundle)[ Packagist](https://packagist.org/packages/nassau/kunstmaan-static-site-bundle)[ RSS](/packages/nassau-kunstmaan-static-site-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

Export your Kunstmaan Bundles CMS website to static HTML files
==============================================================

[](#export-your-kunstmaan-bundles-cms-website-to-static-html-files)

Installation
------------

[](#installation)

`composer require nassau/kunstmaan-static-site-bundle`

Configuration
-------------

[](#configuration)

Configure paths and files you’d like to export using symfony configuration. The below example is the default config:

```
# app/config/config.yml

kunstmaan_static_site:

#    # Set your full domain name to be used when generating full URLs:
#    url_prefix: 'http://example.com'

    # just static files you’d like to export
    files:
        # by default, extract everything in the public "web" folder, excluding PHP files
        web:
            directory: '%kernel.root_dir%/../web'
            exclude: '*.php'

#        # For example, add some custom directory, and store it in generated site under "uploads" path
#        uploads:
#            directory: '%kernel.root_dir%/../uploads'
#            include: '*.jpg'
#            target: 'uploads/'

    # those files will be generated using the application:
    routes:
        # all of the published CMS pages
        pages:
            # use this route to access
            route: '_slug'
            # there is a generator named nodes, and it returns a collection of route params
            # for each nodeTranslation, so a proper url can be generated for it
            generator: 'nodes'

        # we’d like to have a sitemap!
        sitemap_index:
            # this route has only one version, so there is no need to define a generator
            route: 'KunstmaanSitemapBundle_sitemapindex'
            # but there is a required argument to generate url, we provide it here
            defaults:
                _format: 'xml'

        # sitemaps for each language
        sitemaps:
            route: 'KunstmaanSitemapBundle_sitemap'
            # there are multiple versions, one for each locale, so a generator is needed
            generator: 'locales'
            # in addition to values provided by the generator, add those values to generate URL:
            defaults:
                _format: 'xml'

        # simplest config. one route, one url.
        robots:
            route: 'KunstmaanSeoBundle_robots'

#       # for example you have a custom contact page with two variants:
#       contact:
#            # this is your route name
#            route: acme_contact
#            # this service needs to generate an array of params for each variant, see below how to do this!
#            generator: acme_contact
```

Usage
-----

[](#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
-------------

[](#customization)

### Storage backends

[](#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

[](#example)

```
class DiskPreservingFileSystemStorage implements Storage {
    public function storeStaticSite($location, StaticSiteDumper $dumper) {
        foreach ($dumper->getStaticSite() as $path => $response) {
            if (rand(1,10) > 5) {
                // we’re running out of disk space, let’s skip some files!
                continue;
            }

            // do stuff!
        }
    }
}
```

```
# services.yml

services:
    acme.disk_preserving_storage:
        class: DiskPreservingFileSystemStorage
        tags:
          - name: nassau.static_site.storage
            alias: random

```

Now you can use this backend using `random://` protocol: `app/console nassau:static-site:dump random://tmp/static-site`

### Route Parameters Generators

[](#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.

```
class FormatsGenerator extends RouteParametersGenerator
{
    /**
     * @return array[]
     */
    public function getItems() {
        return [
            ['_format' => 'html'],
            ['_format' => 'json'],
            ['_format' => 'xml'],
        ];
    }
}
```

```
# services.yml

services:
    acme.generators.format:
        class: FormatsGenerator
        tags:
          - name: nassau.static_site.generator
            alias: formats

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

2

Last Release

3437d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8572223899390b494d1282b615009bc2eea5ef1cd6bfc22f6e6b175034dadfe0?d=identicon)[mlebkowski](/maintainers/mlebkowski)

---

Top Contributors

[![mlebkowski](https://avatars.githubusercontent.com/u/848731?v=4)](https://github.com/mlebkowski "mlebkowski (4 commits)")

### Embed Badge

![Health badge](/badges/nassau-kunstmaan-static-site-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nassau-kunstmaan-static-site-bundle/health.svg)](https://phpackages.com/packages/nassau-kunstmaan-static-site-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
