<aside>
	<ul class="nav">
		{{ $currentNode := . }}{{ range .Site.Menus.sidebar }}
			{{ if .HasChildren }}
				<li class="nav-item">
					<a class="nav-link" href="#">
						{{ .Pre }}
						{{ .Name }}
					</a>
					<ul>
						{{ range .Children }}
							<li class="nav-item">
								<a class="nav-link{{ if $currentNode.IsMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
									{{ .Pre }}
									{{ .Name }}
								</a>
							</li>
						{{ end }}
					</ul>
				</li>
			{{ else }}
				<li class="nav-item">
					<a class="nav-link{{ if $currentNode.HasMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
						{{ .Pre }}
						{{ .Name }}
					</a>
				</li>
			{{ end }}
		{{ end }}
	</ul>
</aside>

<aside>
	<ul class="nav">
		{{ $currentNode := . }}{{ range .Site.Menus.sidebar }}
			{{ if .HasChildren }}
				<li class="nav-item">
					{{ .Pre }}
					{{ .Name }}
					<ul>
						{{ range .Children }}
							<li class="nav-item">
								<a class="nav-link{{ if $currentNode.IsMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
									{{ .Pre }}
									{{ .Name }}
								</a>
							</li>
						{{ end }}
					</ul>
				</li>
			{{ else }}
				<li class="nav-item">
					<a class="nav-link{{ if $currentNode.HasMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
						{{ .Pre }}
						{{ .Name }}
					</a>
				</li>
			{{ end }}
		{{ end }}
	</ul>
</aside>

Remove links from empty navigation headlines
Remove links from empty navigation headlines
