Skip to content

YAML

YAML🔗

= ("[Website](" + this.url + ")") | YAML 1.2.2 Specification

Resource References
Cheatsheets and Quick References yaml.org refcard

Language🔗

Strings🔗

YAML multi-line string (block scalar): syntax explained, with examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Block scalars (extended, multi-line strings)
key: |
  Block scalars support extended escaping and 3 parameters to modify how white-space and newlines are treated.
# |2 will preserve leading white space by telling yaml there are 2 spaces of
# additional indentation
host_config: |2
    "host": "server.domain.com"
# ignore linebreaks until next key
description: >-
  Tasted a lot like banana
  with a slight sour note.

^7903df

Linting🔗

YAML front matter in Markdown files: see Markdown: Linting and Style.

Tools🔗

  • yq: YAML parser, also supports front matter in (Markdown) files