{{/* {{- $startLevel := 2 -}} {{- $endLevel := 3 -}} {{ with .Param "markup.tableOfContents.startLevel" }} {{- $startLevel = . }} {{- end }} {{ with .Param "markup.tableOfContents.endLevel" }} {{- $endLevel = . }} {{- end -}} {{ debug.Dump ($startLevel) }} {{ debug.Dump ($endLevel) }} {{- define "headings" }} {{- $startLevel := .startLevel -}} {{- $endLevel := .endLevel -}} {{- with .headings }} {{- if and (.Title) (ge .Level $startLevel) (le .Level $endLevel) -}} {{ print (strings.Repeat (sub .Level 1) "\t") }}
  • {{ print (strings.Repeat (sub .Level 1) "\t") }}{{.Title | htmlUnescape}} {{- if .Headings }} {{ print (strings.Repeat (sub .Level 1) "\t") }}
      {{- range $k, $v := .Headings }} {{- template "headings" (dict "headings" $v "startLevel" $startLevel "endLevel" $endLevel) }} {{- end }} {{ print (strings.Repeat (sub .Level 1) "\t") }}
    {{- end }} {{ print (strings.Repeat (sub .Level 1) "\t") }}
  • {{- else }} {{- if .Headings -}} {{ print (strings.Repeat .Level "\t") }}
      {{- range $k, $v := .Headings }} {{- template "headings" (dict "headings" $v "startLevel" $startLevel "endLevel" $endLevel) }} {{- end }} {{ print (strings.Repeat .Level "\t") }}
    {{- end }} {{- end }} {{- end }} {{- end }} */}} {{ ( replace .TableOfContents "