<nav class="navbar navbar-default">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <div class="navbar-collapse collapse" id="navbar">
      <ul class="nav navbar-nav navbar-right">
      {{- $rel := .RelPermalink -}}
      {{- if .Site.Menus.main -}}
        {{- range sort .Site.Menus.main -}}
        <!-- if RelPermalink = this menu item, mark it -->
        <li class="{{if eq $rel .URL}}active{{end}}"><a href="{{ .URL }}">{{ .Name | upper }}</a></li>
        {{- end -}}
      {{ end }}
      </ul>
    </div>
  </div>
</nav>
