2019-01-08 17:33:28 +01:00
|
|
|
{{ if eq (getenv "HUGO_ENV") "production" -}}
|
|
|
|
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
|
|
|
|
{{ else -}}
|
|
|
|
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
|
|
|
{{- end }}
|
|
|
|
|
2019-07-17 15:05:56 +02:00
|
|
|
{{ if (or (eq .Page.Layout "docs") (eq .Page.Layout "single")) -}}
|
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 -}}
|
|
|
|
|
|
|
|
{{- if (eq (getenv "HUGO_ENV") "production") -}}
|
|
|
|
{{- $docsJs = $docsJs | resources.Minify -}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<script src="{{ $docsJs.Permalink | relURL }}"></script>
|