0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00
Bootstrap/site/layouts/partials/scripts.html
XhmikosR d95d30029f Switch to Hugo.
No more Ruby dependency and most important more than 10 times less build time (at least on Windows)!
2019-03-13 19:22:59 +02:00

20 lines
1.1 KiB
HTML

{{ 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 }}
{{ if eq .Page.Layout "docs" -}}
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
{{- end }}
{{- if eq (getenv "HUGO_ENV") "production" -}}
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/docs.min.js"></script>
{{- else -}}
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/anchor.min.js"></script>
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/clipboard.min.js"></script>
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/bs-custom-file-input.min.js"></script>
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/application.js"></script>
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/search.js"></script>
{{- end -}}