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 $mermaidJsAsset "") $mermaidJsAsset (printf "mermaid%s.js" $minSuffix) -}}
|
||||
{{- $mermaidJsUrl := printf "%s/%s" $mermaidBase $jsPath -}}
|
||||
{{- $mermaidJsUrl := urls.JoinPath $mermaidBase $jsPath -}}
|
||||
{{- with try (resources.GetRemote $mermaidJsUrl) -}}
|
||||
{{- with .Err -}}
|
||||
{{- errorf "Could not retrieve Mermaid js file from %s. Reason: %s." $mermaidJsUrl . -}}
|
||||
|
||||
Reference in New Issue
Block a user