Configuring
You can configure the generator by editing the _config/bundles/generator/generator.yaml
file.
destination
The folder (from root) where your site will be saved. By default this is _static
copy
An array of folders that will be copied into the destination folder.
By default these are:
_themes/{theme}/css
_themes/{theme}/img
assets
{theme}
will be replaced by the name of your theme.
urls
A list of URLs that should also be generated.
This is useful if you have custom routes set up or use taxonomies.
urls:
- /an/arbitrary/url
- /blog/categories/{taxonomy:categories}
- /portfolio/{taxonomy:tags}
The {taxonomy:[type]}
tag will be swapped out with every taxonomy of that name. So in the above snippet, the generator will visit /blog/categories/wilderness
, /blog/categories/survival
, etc.
secret_key
If you’d like to be able to generate by hitting a URL (e.g. deployment post-hooks), you can set a secret keyword. Your URL would then be:
example.com/TRIGGER/generator/fire/{{ secret_key }}
throttle
The throttle is the minimum time in seconds between generations (default is 1800). This will prevent things like spiders and stray scripts from potentially flooding your cpu with a lot of work generating the site over and over again.