lib/starter_web/pages/public/tools/cheatsheet/yaml.adoc in j1-template-2023.6.0 vs lib/starter_web/pages/public/tools/cheatsheet/yaml.adoc in j1-template-2023.7.0
- old
+ new
@@ -1,10 +1,12 @@
---
title: YAML
tagline: Cheatsheet for daily use
+
date: 2023-05-19
#last_modified: 2023-01-01
+
description: >
J1 Template is a Bootstrap V5 website template for the static
site generator Jekyll.
The Cheatsheet discuss YAML Markups for daily use.
YAML (short for "YAML Ain't Markup Language") is a human-readable data
@@ -106,10 +108,11 @@
on simplicity and machine readability. They have overlapping use cases but
exhibit some differences in syntax, data types, and readability. JavaScript
has built-in support for working with JSON data, making it a popular choice
for handling data exchange in web applications.
+
[role="mt-5"]
== Scalars
In _YAML_, a *scalar* is a basic data element representing a *single value*.
Scalars can define strings, numbers, booleans, and null values. Here are
@@ -260,10 +263,11 @@
TIP: Using HereDocs, you can include long, formatted text blocks in your YAML
documents without requiring *manual* line concatenation or escaping characters.
There is a good online previewer for the different heredoc modes at
link:{yaml-multiline}[YAML Multiline, {browser-window--new}].
+
[role="mt-5"]
== Sequences (Arrays)
A sequence is a way to represent a *collection* of items. It allows you
to define an *ordered list* of values, similar to an *array* or a list
@@ -345,10 +349,11 @@
You can nest sequences of sequences to represent more complex structures
or hierarchical data. Nesting sequences allow you to organize and represent
data in a structured manner within YAML documents.
+
[role="mt-5"]
== Hash (Dictionary)
A hash is a data structure used to represent *key-value pairs*. It is also
known as a mapping or *dictionary* in other programming languages.
@@ -450,9 +455,10 @@
"nr2": 6
}
}
----
====
+
[role="mt-5"]
== Content References (Aliases)
In _YAML_, content references are a feature that allows you to reference