refactor(search): support local/mirrored FlexSearch assets (#956)
* feat(search): support local and mirrored FlexSearch assets Add params.search.flexsearch.base/js overrides in search script loading. Document offline/local and mirror-based script asset configuration examples. * refactor(scripts): normalize remote asset URL joins * docs(config): clarify local asset examples * docs(i18n): add local asset config guidance
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
{{- /* JS retrieval: get raw JS from either local asset or remote, then process */ -}}
|
||||
{{- if $isRemoteBase -}}
|
||||
{{- $jsPath := cond (ne $zoomJsAsset "") $zoomJsAsset (printf "medium-zoom%s.js" $minSuffix) -}}
|
||||
{{- $zoomJsUrl := printf "%s/%s" $zoomBase $jsPath -}}
|
||||
{{- $zoomJsUrl := urls.JoinPath $zoomBase $jsPath -}}
|
||||
{{- with try (resources.GetRemote $zoomJsUrl) -}}
|
||||
{{- with .Err -}}
|
||||
{{- errorf "Could not retrieve Medium Zoom js file from %s. Reason: %s." $zoomJsUrl . -}}
|
||||
|
||||
Reference in New Issue
Block a user