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-02-17 19:52:28 +01:00
|
|
|
{{ if eq .Page.Layout "docs" -}}
|
2019-01-08 17:33:28 +01:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
|
|
|
{{- end }}
|
|
|
|
|
2019-09-16 23:22:49 +02:00
|
|
|
{{- $vendor := resources.Match "js/vendor/*.js" -}}
|
2019-11-04 13:44:07 +01:00
|
|
|
{{- $js := resources.Match "js/*.js" -}}
|
2019-09-16 23:22:49 +02:00
|
|
|
{{- $targetDocsJSPath := printf "/docs/%s/assets/js/docs.js" .Site.Params.docs_version -}}
|
|
|
|
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
|
|
|
|
|
2020-02-22 07:54:43 +01:00
|
|
|
{{- if eq hugo.Environment "production" -}}
|
2019-09-16 23:22:49 +02:00
|
|
|
{{- $docsJs = $docsJs | resources.Minify -}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<script src="{{ $docsJs.Permalink | relURL }}"></script>
|