2020-02-22 07:54:43 +01:00
|
|
|
{{ if eq hugo.Environment "production" -}}
|
2020-04-28 21:17:43 +02:00
|
|
|
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }} crossorigin="anonymous"></script>
|
2019-01-08 17:33:28 +01:00
|
|
|
{{ else -}}
|
|
|
|
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
|
|
|
{{- end }}
|
|
|
|
|
2020-11-19 20:09:34 +01:00
|
|
|
{{ if eq .Page.Layout "docs" -}}
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- $vendor := resources.Match "js/vendor/*.js" -}}
|
|
|
|
{{- $js := resources.Match "js/*.js" -}}
|
|
|
|
{{- $targetDocsJSPath := printf "/docs/%s/assets/js/docs.js" .Site.Params.docs_version -}}
|
|
|
|
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
|
|
|
|
|
|
|
|
{{- if eq hugo.Environment "production" -}}
|
|
|
|
{{- $docsJs = $docsJs | resources.Minify -}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<script src="{{ $docsJs.Permalink | relURL }}"></script>
|