my site: twv2.netlify.app
based on this template: logbook
I am setting up a site with 3 languages and the theme has a preconfigured language selector.
When I use ‘hugo server’ locally all the language links are in the correct place.
When built using Netlify the language links are random and dont resemble the actual associated language link.
header.html
...
<!-- Language List -->
{{ if .IsTranslated }}
<select class="m-2 border-0" id="select-language" onchange="location = this.value;">
{{ $siteLanguages := site.Languages}}
{{ $pageLang := .Page.Lang}}
{{ range .Page.AllTranslations }}
{{ $translation := .}}
{{ range $siteLanguages }}
{{ if eq $translation.Lang .Lang }}
{{ $selected := false }}
{{ if eq $pageLang .Lang}}
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}
</option>
{{ else }}
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</select>
{{ end }}
...
Any help to know what the difference would be from ‘hugo server’ and ‘hugo --minify --gc’ that might be causing the issues.
Kind regards