Fix main menu: don't create empty menu w/o items

This commit is contained in:
vimux 2019-08-03 16:46:14 -04:00
parent 6b012549ae
commit 39d7cc55eb
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34

View file

@ -1,10 +1,12 @@
<header>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ with .Site.Menus.main }}
<nav>
<ul>
{{ range .Site.Menus.main }}
{{ range . }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
</header>