mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-20 16:15:09 +00:00
version: fix sub directory for mulitlang #1050
This commit is contained in:
parent
a05b212465
commit
3ccc8f777f
2 changed files with 8 additions and 1 deletions
layouts/partials
|
@ -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 }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.5.0+67adcb73225ceeeb11bc09cfeaf6c8b9dbdb5c2a
|
||||
7.5.0+a05b2124652293b1be3742f26aa3913861f956de
|
Loading…
Add table
Reference in a new issue