{{- $title := .Get "title" -}} {{- $filter := .Get "filter" }} {{- $f := strings.TrimSuffix "." $filter -}}

{{ $f }} - {{ $title }}

{{ range $rule := where .Site.Pages "Section" "klc" -}} {{ with $rule.File }} {{- $filename := .LogicalName -}} {{- if and (hasPrefix $filename $filter) (in $filename ".adoc") -}} {{- $rulename := strings.TrimSuffix ".adoc" $filename -}} {{- $rulenum := index (last 1 (split $rulename ".")) 0 -}} {{- $rulenumstring := printf "%04d" (int $rulenum) -}} {{- $.Scratch.SetInMap "rules" $rulenumstring $rule -}} {{- end -}} {{- end -}} {{- end -}} {{- range $rule := $.Scratch.GetSortedMapValues "rules" -}} {{ with $rule.File }} {{- $rulename := strings.TrimSuffix ".adoc" .LogicalName -}}

{{- $rulename }} - {{ $rule.Params.brief -}}

{{ $rule.Content }}

{{ end }} {{- end -}}