{{- /*  
  Render template call stack for debugging purpose.
  @example
  {{- partial "_debug/template-call-stack.html" . -}}
*/ -}}
{{- if eq hugo.Environment "debug" | and hugo.IsServer -}}
  {{- with templates.Current -}}
    <ul class="template-call-stack">
      {{- range .Ancestors -}}
        <li><a href="vscode://file/{{ .Filename }}"><small>{{ .Filename }}</small></a></li>
        {{- with .Base -}}
          <li><a href="vscode://file/{{ .Filename }}"><small>{{ .Filename }}</small></a></li>
        {{- end -}}
      {{- end -}}
    </ul>
  {{- end -}}
{{- end -}}
