Fix code syntax highlighting in docs (#5245)

* Added yaml to undelcared code blocks
* Changed YAML->yaml for consistency
* Added console syntax highlighting

Signed-off-by: Dean Coakley <dean.s.coakley@gmail.com>
pull/5252/head
Dean Coakley 7 years ago committed by Matthew Fisher
parent 7161095f79
commit 251a6a2b58

@ -20,7 +20,7 @@ The first control structure we'll look at is for conditionally including blocks
The basic structure for a conditional looks like this:
```
```yaml
{{ if PIPELINE }}
# Do something
{{ else if OTHER PIPELINE }}
@ -115,7 +115,7 @@ data:
`mug` is incorrectly indented. Let's simply out-dent that one line, and re-run:
```
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
@ -224,7 +224,7 @@ The next control structure to look at is the `with` action. This controls variab
The syntax for `with` is similar to a simple `if` statement:
```
```yaml
{{ with PIPELINE }}
# restricted scope
{{ end }}

@ -12,7 +12,7 @@ When your YAML is failing to parse, but you want to see what is generated, one
easy way to retrieve the YAML is to comment out the problem section in the template,
and then re-run `helm install --dry-run --debug`:
```YAML
```yaml
apiVersion: v1
# some: problem section
# {{ .Values.foo | quote }}
@ -20,7 +20,7 @@ apiVersion: v1
The above will be rendered and returned with the comments intact:
```YAML
```yaml
apiVersion: v1
# some: problem section
# "bar"

@ -4,7 +4,7 @@ So far, we've seen how to place information into a template. But that informatio
Let's start with a best practice: When injecting strings from the `.Values` object into the template, we ought to quote these strings. We can do that by calling the `quote` function in the template directive:
```
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
@ -104,7 +104,7 @@ drink: {{ .Values.favorite.drink | default "tea" | quote }}
If we run this as normal, we'll get our `coffee`:
```
```yaml
# Source: mychart/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap

@ -54,7 +54,7 @@ data:
Because `favoriteDrink` is set in the default `values.yaml` file to `coffee`, that's the value displayed in the template. We can easily override that by adding a `--set` flag in our call to `helm install`:
```
```console
helm install --dry-run --debug --set favoriteDrink=slurm ./mychart
SERVER: "localhost:44134"
CHART PATH: /Users/mattbutcher/Code/Go/src/k8s.io/helm/_scratch/mychart
@ -85,7 +85,7 @@ favorite:
Now we would have to modify the template slightly:
```
```yaml
apiVersion: v1
kind: ConfigMap
metadata:

@ -177,7 +177,7 @@ Now the value of `coffee` will be `Latte\nCappuccino\nEspresso\n\n\n`.
Indentation inside of a text block is preserved, and results in the preservation
of line breaks, too:
```
```yaml
coffee: |-
Latte
12 oz
@ -336,7 +336,7 @@ reference is expanded and then discarded.
So if we were to decode and then re-encode the example above, the resulting
YAML would be:
```YAML
```yaml
coffee: yes, please
favorite: Cappucino
coffees:

Loading…
Cancel
Save