Skip to content

Commit

Permalink
Merge pull request #136 from martinhoefling/master
Browse files Browse the repository at this point in the history
Make menu URLs compatible with multilanguage sites
  • Loading branch information
kakawait authored Apr 15, 2017
2 parents ce9c84c + dca57a8 commit 62ecf31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{{ if and (in .URL "://") (not (in .URL (printf "%s" $.root.Site.BaseURL))) }}
<a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | safeURL }}" target="_blank">
{{ else }}
<a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL }}">
<a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | relLangURL }}">
{{ end }}
{{ .Pre }}
{{ $name := (i18n (printf "global.%s" .Identifier)) }}
<span class="sidebar-button-desc">{{ if eq (len $name) 0 }}{{ .Name }}{{ else }}{{ $name }}{{ end }}</span>
</a>
</li>
{{ end }}
{{ end }}

0 comments on commit 62ecf31

Please sign in to comment.