Add CLI option to specify the site generator to use
Add an option to the generate
command of the CLI to specify an alternate site generator. If this option is not present, the @antora/site-generator-default
is assumed.
We've always envisioned the site generator as a replaceable component (for advanced users), hence the name site-generator-default. Supplying a custom site generator allows the user to add custom processing to the generator pipeline or adapt Antora to new use cases. At this early stage, it can be an important enabler of experimentation.
Add the option --generator
to the generate
command of the CLI. This option accepts an absolute or relative path or a local or global module name that resolves to a custom site generator.
antora generate --generator my-site-generator site.yml
The script or module must export the following function.
function generateSite (args, env) {
// ...
}
We should be clear that this is not yet a stable API. Users should not assume this is a stable extension point until Antora 1.0 is released.