{{- /* A linear flow. One step per line: Label | detail markdown | optional-spec-slug */ -}} {{- $steps := slice -}} {{- range split (trim .Inner "\n") "\n" -}} {{- $line := trim . " \t\r" -}} {{- if $line -}} {{- $parts := split $line "|" -}} {{- $steps = $steps | append (dict "label" (trim (index $parts 0) " ") "detail" (cond (gt (len $parts) 1) (trim (index $parts 1) " ") "") "spec" (cond (gt (len $parts) 2) (trim (index $parts 2) " ") "")) -}} {{- end -}} {{- end -}}
{{ with .Get 0 }}
Flow{{ . }}
{{ end }}
    {{- range $i, $s := $steps }}
  1. {{ printf "%02d" (add $i 1) }} {{ $s.label | $.Page.RenderString }} {{ with $s.detail }}{{ . | $.Page.RenderString }}{{ end }} {{ with $s.spec }} {{ with site.GetPage (printf "/specs/%s" .) }} {{ .Title }} {{ else }}{{ warnf "%s: flow step links unknown specification %q" $.Page.File.Path . }}{{ end }} {{ end }}
  2. {{- end }}