From 1123ffef79ce908db773a7fef76943b1861212cb Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sat, 8 Oct 2022 11:13:36 -0400 Subject: [PATCH] Scripts: get Popper from Bootstrap bundle --- layouts/partials/scripts.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 1addf22699..2cbe2f870f 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -48,8 +48,7 @@ {{ printf "onload='renderMathInElement(%s, %s);'" (( .Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( printf "%s" ( $.Site.Params.katex.options | jsonify )) | safeHTMLAttr }}> {{ end -}} -{{ $jsPopper := resources.GetRemote "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.js" -}} -{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.js" -}} +{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.bundle.js" -}} {{ $jsBase := resources.Get "js/base.js" -}} {{ $jsAnchor := resources.Get "js/anchor.js" -}} {{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home -}} @@ -60,7 +59,7 @@ {{ if .Site.Params.offlineSearch -}} {{ $jsSearch = resources.Get "js/offline-search.js" -}} {{ end -}} -{{ $js := (slice $jsPopper $jsBs $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} +{{ $js := (slice $jsBs $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} {{ if hugo.IsProduction -}} {{ $js := $js | minify | fingerprint -}}