2025-05-05 02:07:50 +02:00
|
|
|
---
|
|
|
|
title: yaml
|
|
|
|
description:
|
|
|
|
published: true
|
|
|
|
date: 2023-04-28T02:38:18.678Z
|
|
|
|
tags:
|
|
|
|
editor: markdown
|
|
|
|
dateCreated: 2023-04-28T02:22:37.379Z
|
|
|
|
---
|
|
|
|
|
2025-05-05 01:51:50 +02:00
|
|
|
# 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"
|
|
|
|
```
|