Prevents menu links returning 404 when staging PRs #42
1 changed files with 8 additions and 0 deletions
commit
1fbdf9d082
8
layouts/_partials/menu.html
Normal file
8
layouts/_partials/menu.html
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<nav class="main-menu{{ if not ($.Param "menuinheader") }} mx--xs layout__navigation{{ end }}" aria-label="{{ i18n "menu_title" }}">
|
||||||
|
<ul class="flex-inline mx--0">
|
||||||
|
{{ $currentPage := . -}}
|
||||||
|
{{ range site.Menus.main -}}
|
||||||
|
<li><a href="{{ .URL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} aria-current="page"{{ end }}>{{ .Pre }}<span>{{ or (i18n .Identifier) .Name | safeHTML }}</span>{{ .Post }}</a></li>
|
||||||
|
{{ end -}}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue