<!-- {{/*
Attributes: name [default: "main"]

Display main navigation menu:
{{< navmenu >}}

Display custom navigation menu:
{{< navmenu "sidebar" >}}

*/}} -->

{{ $name := .Get 0 | default "main" }}
{{ $entries := index .Site.Menus $name }}
{{ $page := .Page.Page }}
{{ with $.Site.Params.layout.menu }}
  {{ $settings := index . $name | default dict }}
  {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $page)}}
{{ else }}
  {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $page)}}
{{ end }}
