What does ampersand mean in yaml

From razwiki
Jump to navigation Jump to search

It creates a yaml anchor, which allows you to duplicate / inherit content.

# YAML also has a handy feature called 'anchors', which let you easily duplicate
# content across your document. Both of these keys will have the same value:
anchored_content: &anchor_name This string will appear as the value of two keys.
other_anchor: *anchor_name

[1]