Hugo Language links not working on Netlify but work locally

my site:

based on this template: logbook

Github repo

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.


    <!-- 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 }}
          {{ else }}
          <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
          {{ end }}
          {{ end }}
          {{ end }}
          {{ end }}
        {{ 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

I don’t understand this part, could you please show us how it should look vs how it’s looking?

Hi, thanks for the response.

The developer of the theme replied to me and gave me a fix. There was an {{ end }} tag out of place in the baseof.html file so the permalinks were not correct.