1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-28 07:39:57 +02:00

Revert "Use Hugo mounts for our docs vendor files." (#32210)

* Revert "Adapt to the recent main changes"

This reverts commit 50d8921670.

* Revert "Add Hugo Pipes logic for local and vendored scripts."

This reverts commit 3fcfd606f2.

* Revert "Use Hugo mounts for our docs vendor JS files."

This reverts commit 6b071116f3.
This commit is contained in:
XhmikosR
2020-11-19 21:09:34 +02:00
committed by GitHub
parent 50d8921670
commit 6637154beb
7 changed files with 31 additions and 605 deletions

View File

@@ -4,7 +4,17 @@
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
{{- end }}
{{- $variant := cond (eq .Page.Layout "docs") "docs" "default" -}}
{{- range partialCached "func/get-js-assets" . $variant -}}
<script src="{{ .RelPermalink }}"></script>
{{- end -}}
{{ 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>