mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
Fix translation when using a custom baseURL
When the baseURL is not / using $translation.URL is ignoring the baseURL. In order to sort this behavior, $translation.Permalink is working just fine.
This commit is contained in:
parent
07addb4c99
commit
2dbd46d4ec
1 changed files with 2 additions and 2 deletions
|
@ -57,9 +57,9 @@
|
|||
{{ if eq $translation.Lang .Lang }}
|
||||
{{ $selected := false }}
|
||||
{{ if eq $pageLang .Lang}}
|
||||
<option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option>
|
||||
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{ else }}
|
||||
<option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
|
||||
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue