External Links in Menues

Another solution is to add a custom params field to your menu item.

[menu]
[[menu.main]]
  name = 'Hugo'
  url = 'https://gohugo.io/'
  weight = 10
  [menu.main.params]
    external = true

Then in your template do something like this:

{{ range .Site.Menus.main }}
  <li>
    <a class="{{ if eq $currentPage.RelPermalink .URL }}is-active{{end}}" href="{{.URL}}" {{ if eq .Params.external true }}target="_blank" rel="noopener noreferrer"{{ end }}>
      {{ .Name }}
    </a>
  </li>
{{ end }}