{{ if and (gt .WordCount 400) (.Params.toc | default false) }}
<aside id="table-of-contents">
  <details {{ if eq .Params.toc "open" }}open{{ end }}>
    <summary>Table of Contents</summary>
    {{ .TableOfContents }}
  </details>
</aside>
{{ end }}
