Wiki/Cheatsheets/yaml.md
2025-05-05 02:07:50 +02:00

826 B

title, description, published, date, tags, editor, dateCreated
title description published date tags editor dateCreated
yaml true 2023-04-28T02:38:18.678Z markdown 2023-04-28T02:22:37.379Z

YAML Ain't Markup Language

# Comment

key: value
key: "string\nstring"
key: string
key: 'string'
key: 123

object:
  key: value
  key2: value2

object-list:
  - list-item: value
    key: value
  - list-item: value2
    key: value2

object-list: [value1, value2, value3]

key: |
  This is a multiline value
  it takes everything untill the next key

key: >
  This is a single line value
  but it is written on multiple lines
  just for readability

key: "$USER" #Yes Variables work

--- File divider to put multiple YAML configs in 1 file

command:
  - sh
  - -c
  - |
    #!/bin/bash
    printf "Hello World!"
    exit
  - echo  "Yes I just ran a bash script using YAML"