{{ define "main" }}
<div class="blog-post">
    <header>
        <h1>{{ .Title }}</h1>
        <div class="details">
            <div class="date">Last updated: {{ .Lastmod.Format "January 2, 2006" }}</div>
        </div>
    </header>
    {{ $showToC := default (default true .Site.Params.BookShowToC) .Params.showtoc }}
    {{ if and ($showToC) (.Page.TableOfContents) }}
    <aside class="article-toc">
        {{ .Page.TableOfContents }}
    </aside>
    {{ end }}
    <article class="markdown">
        {{- .Content -}}
    </article>
</div>
{{ end }}

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