x-2 py-1.5 text-sm font-semibold text-gray-900 first:mt-0 dark:text-gray-100">
            <span class="cursor-default">{{ .LinkTitle }}</span>
          </li>
        {{- else -}}
          {{- $active := eq $pageURL .RelPermalink -}}
          {{- $shouldOpen := or (.Params.sidebar.open) (.IsAncestor $page) $active | default true }}
          <li class="{{ if $shouldOpen }}open{{ end }}">
            {{- template "sidebar-item-link" dict "context" . "active" $active "title" .LinkTitle "link" .RelPermalink