{{ $type := .Type }}
{{ $kind := .Kind }}
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
  <li class="sidebar-item {{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} is-active{{ end }}{{ if and (eq .Identifier "home") (eq $type "post") }} is-active{{ end }}{{ if and (eq .Identifier "home") (and (eq $type "page") (eq $kind "taxonomy"))}} is-active{{ end }}"><a class="sidebar-link" href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
