fix: Prevents menu 404 links when staging PRs
All checks were successful
/ build (pull_request) Successful in 27s
All checks were successful
/ build (pull_request) Successful in 27s
This commit is contained in:
parent
95467ac0f0
commit
1fbdf9d082
1 changed files with 8 additions and 0 deletions
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