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 commit50d8921670
. * Revert "Add Hugo Pipes logic for local and vendored scripts." This reverts commit3fcfd606f2
. * Revert "Use Hugo mounts for our docs vendor JS files." This reverts commit6b071116f3
.
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user