Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vimux/blank.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimux <vimux@protonmail.com>2019-08-03 23:46:14 +0300
committervimux <vimux@protonmail.com>2019-08-03 23:46:14 +0300
commit39d7cc55ebf5f798358b23eaf202f96e8db31667 (patch)
treedc21a4351a747fc3b26fd3ba48e810249a2a95de
parent6b012549ae6759a7704bed9dda854e9fea0a9d4e (diff)
Fix main menu: don't create empty menu w/o items
-rw-r--r--layouts/partials/header.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 86e0e27..384d2bf 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -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>