{{/* Table of Contents */}} {{/* TODO: toc bottom part should be able to hide */}} {{- $toc := .Params.toc | default true -}} {{- with site.Params.toc.disabled -}}{{ $toc = not . }}{{- end -}} {{/* TOC subheadings component. This is a recursive component that renders a list of headings. */}} {{- define "toc-subheading" -}} {{ $headings := .headings }} {{ $level := .level }} {{ if ge $level 6 }} {{ return }} {{ end }} {{ $padding := (mul $level 4) }} {{ $class := cond (eq $level 0) "font-semibold" (printf "ltr:pl-%d rtl:pr-%d" $padding $padding) }} {{ range $headings }} {{ if .Title }}