{{- $toc := .TableOfContents -}} {{- $hasTOC := gt (len (findRE "
  • " $toc)) 0 -}} {{- $dossierSummary := partial "dossier-summary.html" (dict "Page" .) -}} {{- $hasDossierSummary := ne (strings.TrimSpace $dossierSummary) "" -}} {{- if or $hasDossierSummary $hasTOC -}} {{- $tocMarkup := "" -}} {{- if $hasTOC -}} {{- $tocMarkup = replace $toc `` `` -}} {{- end -}} {{- end -}}