Skip to content

Commit 3af23fd

Browse files
committed
masthead.html: Improve menu entry rendering
- Fix entries not being rendered in non-primary language sites - Enable entries not associated with a page
1 parent 7721de5 commit 3af23fd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

layouts/partials/masthead.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@
3535
</label>
3636
<ul class="floating-menu navigation-links visible-links">
3737
{{- range .Site.Menus.navigation }}
38-
{{- with $.Site.GetPage .URL }}
3938
<li class="masthead__menu-item">
39+
{{- with .Page }}
4040
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
41-
</li>
41+
{{- else }}
42+
<a href="{{ .URL }}">{{ .Name }}</a>
4243
{{- end }}
44+
</li>
4345
{{- end }}
4446
</ul>
4547
</div>

0 commit comments

Comments
 (0)