Fix main menu: don't create empty menu w/o items
This commit is contained in:
parent
6b012549ae
commit
39d7cc55eb
1 changed files with 3 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue