{{ $file := .Get "file" }} {{ $code := "" }} {{ with .Get "config" }} {{ $file = $file | default "config" }} {{ $sections := (split . ".") }} {{ $configSection := index $.Site.Data.docs.config $sections }} {{ $code = dict $sections $configSection }} {{ if $.Get "skipHeader"}} {{ $code = $configSection }} {{ end }} {{ else }} {{ $code = $.Inner }} {{ end }} {{ $langs := (slice "yaml" "toml" "json") }}
{{- with $file -}}
{{ . }}.
{{- end -}} {{ range $langs }}   {{ end }}
{{ range $langs }}
{{ highlight ($code | transform.Remarshal . | replaceRE `\n+` "\n" | safeHTML) . "" }}
{{ if ne ($.Get "copy") "false" }} {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} {{end}} {{ end }}