<label for="navtoggle">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" aria-hidden="true" focusable="false"><path stroke-linecap="round" stroke="currentColor" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg>
    Documentation
</label>
<input id="navtoggle" type="checkbox" aria-hidden="true" tabindex="-1">
<div>
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "overview" "Open" true) }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "web-tutorials") }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "cli-tutorials") }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "concepts" "Open" true) }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "addons" "Open" true) }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "api") }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "howto" "Open" true) }}
    {{ partial "sidebar/menu" (dict "Ctx" . "Section" "tutorials" "Open" true) }}
</div>


{{ define "partials/sidebar/menu" }}
    {{ $section := (where .Ctx.Site.RegularPages "Section" .Section).ByWeight }}
    {{ $open := and (or .Open (eq .Ctx.Page.Section .Section)) "open"  }}
    {{ $sectionPage := .Ctx.Site.GetPage (printf "/%s" .Section) }}
    <details {{ $open }}>
    <summary>{{ $sectionPage.Title }}</summary>

    {{ range $section }}
        <a href="{{ .Permalink }}">
            {{ .Name }}
        </a>
    {{ end }}
    </details>
{{ end }}