version: fix sub directory for mulitlang

This commit is contained in:
Sören Weber 2025-03-20 00:21:20 +01:00
parent a05b212465
commit 3ccc8f777f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 8 additions and 1 deletions

View file

@ -118,6 +118,13 @@
{{- $this_path := .RelPermalink }}
{{- $path := (strings.TrimPrefix $home_path $this_path) | default "/" }}
{{- $path = partial "permalink.gotmpl" (dict "link" $path) }}
{{- $default_home_lang_path := site.Sites.Default.Home.Permalink }}
{{- $this_home_lang_path := site.Home.Permalink }}
{{- $lang_path := strings.TrimPrefix "/" (strings.TrimPrefix (strings.TrimSuffix "/" $default_home_lang_path) (strings.TrimSuffix "/" $this_home_lang_path)) }}
{{- $lang := .Language.Lang }}
{{- if eq $lang_path $lang }}
{{- $path = printf "/%s%s" $lang_path $path }}
{{- end }}
<script>
window.relearn = window.relearn || {};
{{ "// configuration" | safeJS }}

View file

@ -1 +1 @@
7.5.0+67adcb73225ceeeb11bc09cfeaf6c8b9dbdb5c2a
7.5.0+a05b2124652293b1be3742f26aa3913861f956de