ive "title" $title "link" .RelPermalink -}}
              {{- if and $toc $active -}}
                {{ template "sidebar-toc" dict "page" . }}
              {{- end }}
              {{ template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc }}
            </li>
          {{- end -}}
        </ul>
      </div>
    {{- end -}}
  {{- end }}
{{- end -}}

{{- define "sidebar-toc" -}}
  {{ $page := .page }}
  {{ with $page.Fragments.Headings }}
    <ul class='f