diff --git a/site/content/docs/5.3/examples/cheatsheet-rtl/index.html b/site/content/docs/5.3/examples/cheatsheet-rtl/index.html index eeb825fad3fb..824afb4f23dc 100644 --- a/site/content/docs/5.3/examples/cheatsheet-rtl/index.html +++ b/site/content/docs/5.3/examples/cheatsheet-rtl/index.html @@ -5,6 +5,7 @@ - "../cheatsheet/cheatsheet.rtl.css" extra_js: - src: "../cheatsheet/cheatsheet.js" + defer: true body_class: "bg-body-tertiary" direction: rtl --- diff --git a/site/content/docs/5.3/examples/cheatsheet/index.html b/site/content/docs/5.3/examples/cheatsheet/index.html index cbe2b745c9ef..ad52ceebb41e 100644 --- a/site/content/docs/5.3/examples/cheatsheet/index.html +++ b/site/content/docs/5.3/examples/cheatsheet/index.html @@ -5,6 +5,7 @@ - "cheatsheet.css" extra_js: - src: "cheatsheet.js" + defer: true body_class: "bg-body-tertiary" --- diff --git a/site/content/docs/5.3/examples/checkout-rtl/index.html b/site/content/docs/5.3/examples/checkout-rtl/index.html index 6516efea61ab..6ec0889e3389 100644 --- a/site/content/docs/5.3/examples/checkout-rtl/index.html +++ b/site/content/docs/5.3/examples/checkout-rtl/index.html @@ -6,6 +6,7 @@ - "../checkout/checkout.css" extra_js: - src: "../checkout/checkout.js" + defer: true body_class: "bg-body-tertiary" --- diff --git a/site/content/docs/5.3/examples/checkout/index.html b/site/content/docs/5.3/examples/checkout/index.html index d39f0f2a41e2..a6ecd813eb17 100644 --- a/site/content/docs/5.3/examples/checkout/index.html +++ b/site/content/docs/5.3/examples/checkout/index.html @@ -5,6 +5,7 @@ - "checkout.css" extra_js: - src: "checkout.js" + defer: true body_class: "bg-body-tertiary" --- diff --git a/site/content/docs/5.3/examples/dashboard-rtl/index.html b/site/content/docs/5.3/examples/dashboard-rtl/index.html index d0a71f67b7ab..a2ccc9e160f2 100644 --- a/site/content/docs/5.3/examples/dashboard-rtl/index.html +++ b/site/content/docs/5.3/examples/dashboard-rtl/index.html @@ -7,7 +7,9 @@ extra_js: - src: "https://cdn.jsdelivr.net/npm/chart.js@4.3.2/dist/chart.umd.js" integrity: "sha384-eI7PSr3L1XLISH8JdDII5YN/njoSsxfbrkCTnJrzXt+ENP5MOVBxD+l6sEG4zoLp" + defer: true - src: "dashboard.js" + defer: true --- diff --git a/site/content/docs/5.3/examples/dashboard/index.html b/site/content/docs/5.3/examples/dashboard/index.html index 508e8b8c4cca..d8941f3684b2 100644 --- a/site/content/docs/5.3/examples/dashboard/index.html +++ b/site/content/docs/5.3/examples/dashboard/index.html @@ -6,7 +6,9 @@ extra_js: - src: "https://cdn.jsdelivr.net/npm/chart.js@4.3.2/dist/chart.umd.js" integrity: "sha384-eI7PSr3L1XLISH8JdDII5YN/njoSsxfbrkCTnJrzXt+ENP5MOVBxD+l6sEG4zoLp" + defer: true - src: "dashboard.js" + defer: true --- diff --git a/site/content/docs/5.3/examples/offcanvas-navbar/index.html b/site/content/docs/5.3/examples/offcanvas-navbar/index.html index f72583f9b1c5..34c06ad88d61 100644 --- a/site/content/docs/5.3/examples/offcanvas-navbar/index.html +++ b/site/content/docs/5.3/examples/offcanvas-navbar/index.html @@ -5,6 +5,7 @@ - "offcanvas-navbar.css" extra_js: - src: "offcanvas-navbar.js" + defer: true body_class: "bg-body-tertiary" aliases: "/docs/5.3/examples/offcanvas/" --- diff --git a/site/content/docs/5.3/examples/sidebars/index.html b/site/content/docs/5.3/examples/sidebars/index.html index 02a9456cc8f5..135c26832391 100644 --- a/site/content/docs/5.3/examples/sidebars/index.html +++ b/site/content/docs/5.3/examples/sidebars/index.html @@ -5,6 +5,7 @@ - "sidebars.css" extra_js: - src: "sidebars.js" + defer: true body_class: "" --- diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index a71e0f7b54fd..3f9463bddb3b 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -67,7 +67,7 @@

{{ .Title | markdownify }}

{{ end }} {{ define "footer" }} {{ range .Page.Params.extra_js -}} - + {{- end -}} {{ end }} diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index 3b048a9d4414..c252ea46eae6 100644 --- a/site/layouts/_default/examples.html +++ b/site/layouts/_default/examples.html @@ -159,13 +159,13 @@ {{ .Content }} {{- if hugo.IsProduction -}} - + {{- else -}} - + {{- end }} {{ range .Page.Params.extra_js -}} - + {{- end -}} diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html index 52cb5c7b8919..4470002653e7 100644 --- a/site/layouts/partials/scripts.html +++ b/site/layouts/partials/scripts.html @@ -1,7 +1,7 @@ {{ if hugo.IsProduction -}} - + {{ else -}} - + {{- end }} {{- $esbuildOptions := dict "target" "es2019" -}} @@ -12,7 +12,7 @@ {{- end }} {{- $applicationJs := resources.Get "js/application.js" | js.Build $esbuildOptions | resources.Copy (path.Join $targetDocsJSPath "/assets/js/application.js") }} - + {{- if (ne .Page.Layout "examples") -}} {{- $searchJs := resources.Get "js/search.js" | js.Build $esbuildOptions | resources.Copy (path.Join $targetDocsJSPath "/assets/js/search.js") }}