{{ define "main" }}
<article class="markdown">
    {{ partial "breadcrumbs" . }}
    {{- .Content -}}

    {{ if gt (len .Pages) 0 }}
    <h3>Contents:</h3>
    <ul class="contents-list">
        {{ range .Pages.ByParam "title" }}
        <li>
            <a href="{{ .RelPermalink }}">{{ .Title }}</a>
        </li>
        {{ end}}
    </ul>
    {{ end }}
</article>
{{ end }}

{{ define "toc" }}
{{ partial "docs/toc" . }}
{{ end }}
