version: fix for subdirectories #1050

This commit is contained in:
Sören Weber 2025-03-19 23:53:56 +01:00
parent 67d43d0a8a
commit 67adcb7322
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 6 additions and 2 deletions

View file

@ -114,11 +114,15 @@
{{- end }}
{{- end }}
{{- end }}
{{- $home_path := site.Home.RelPermalink }}
{{- $this_path := .RelPermalink }}
{{- $path := (strings.TrimPrefix $home_path $this_path) | default "/" }}
{{- $path = partial "permalink.gotmpl" (dict "link" $path) }}
<script>
window.relearn = window.relearn || {};
{{ "// configuration" | safeJS }}
{{ printf "window.relearn.min = `%s`;" $min | safeJS }}
window.relearn.path='{{ partial "permalink.gotmpl" (dict "to" .) | safeJS }}';
window.relearn.path='{{ $path | safeJS }}';
window.relearn.relBasePath='{{ partial "_relearn/relBasePath.gotmpl" . | safeJS }}';
window.relearn.relBaseUri='{{ partial "_relearn/relBaseUri.gotmpl" . | safeJS }}';
window.relearn.absBaseUri='{{ replaceRE "/*$" "" .Site.BaseURL | safeJS }}';

View file

@ -1 +1 @@
7.5.0+4753a3e2e302597e65b9f9327e8bde5cd0a6dabe
7.5.0+67d43d0a8a647b8b4b09cdb0103001e87e7b104c