Support "merge" type from YAML 1.1 in playbook file
Originating from a Zulip thread.
After upgrading to beta.5 it's no longer possible to use the merge functionality that was implicitly enabled in js-yaml
up until Antora 3.0.0-beta.5 for Antora playbooks.1 Thus, the following playbook that (besides version
keys and extensions keys not shown) works with Antora 2.3 no works as both the branches
and start_paths
keys are gone.
I've got something like this:
# ....
content:
sources:
- &wood_source
url: https://wood-supplier.com/redwood.git
start_paths: wood-docs
branches: wood/releases
version:
'release-(?<version>.*)': '$<version>'
- <<: *wood_source
url: https://wood-supplier.com/birch.git
- <<: *wood_source
url: https://wood-supplier.com/spruce.git
To be clear, the precise usefulness of the YAML anchors is due to having different kinds of content sources & components that exclude one sane default as an option (thus far).
This seems to be because the default schema includes merge
support (the <<
key), whereas the core schema does not, which is related to #898 (closed).
I'm not sure if it's exactly a "breaking" change, though if you had used <<
before you'd might consider it one when building the documentation site fails.
However, it's not like the documentation at any points recommends using the merge key together with YAML anchors.
-
We have not used YAML merging in component descriptors.
↩