In order to publish a site to multiple destinations, including one or more filesystem destinations, your playbook must set the
fs publishes the site to a directory on a filesystem.
It’s the formal equivalent to specifying the output directory using the
output: destinations: (1) - provider: fs (2)
path key or dir key is specified, the default path for the
fs provider is build/site.
path key designates the target location where the output files are to be written.
fs provider treats this value as a target directory.
path key accepts a relative or absolute filesystem path.
The provider will create any interim directories as needed.
A relative path is expanded to an absolute path using the following rules:
If the first path segment is a tilde (
~), the remaining path is resolved relative to the user’s home directory.
If the first path segment is a dot (
.), the remaining path is resolved relative to the location of the playbook file.
If the first path segment is a tilde directly followed by a plus sign (
~+), or does not begin with an aforementioned prefix, the remaining path is resolved relative to the current working directory.
path isn’t specified, it gets populated with the default value, build/site, or, in the case of the first
fs provider, the value of
When the dir key is specified, its value is assigned to (or overrides) the first
When the output directory is specified from the CLI using the --to-dir option, it also overrides the first
path (as well as
dir) in a playbook.
In Example 2, the site will be published to a folder named launch relative to the playbook file.
output: destinations: - provider: fs path: ./launch
In Example 3, the site will be published to home/dev/site/beta, regardless of where the playbook is located.
output: destinations: - provider: fs path: /home/dev/site/beta
clean key is optional and is deactivated (assigned the value
false) by default.
It can be applied as part of an
fs provider configuration instead of directly under the output key.
output: destinations: - provider: fs path: /home/dev/site/beta clean: true (1)
clean is assigned the value
true, it removes the destination
path recursively before generating the site.
This key only applies to the
Use this key with great care.
For example, if you set
In Example 5, Antora is running on a playbook file in the tmp directory and publishing the site to two locations, one relative and one absolute.
output: destinations: - provider: fs path: ./releases/red clean: true - provider: archive path: /home/user/projects/docs-site/blue.zip
The site files published using the
fs are written to the directory tmp/releases/red.
This directory will be removed prior to publishing since the
clean key is assigned
The site is also published as an archive to /home/user/projects/docs-site/blue.zip by the