mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 18:37:05 +08: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
@ -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…
x
Reference in New Issue
Block a user