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>
|
<header>
|
||||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||||
|
{{ with .Site.Menus.main }}
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Site.Menus.main }}
|
{{ range . }}
|
||||||
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Reference in a new issue