]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
docs: mention our bundle file clearly.
authorXhmikosR <xhmikosr@gmail.com>
Tue, 14 Jul 2020 16:21:39 +0000 (19:21 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 15 Sep 2020 05:57:19 +0000 (08:57 +0300)
Note that we are using the bundle file already in our docs since 787441d.

site/content/docs/5.0/getting-started/download.md
site/content/docs/5.0/getting-started/introduction.md
site/layouts/partials/home/masthead-followup.html

index e4a293e5d85319862ad673484d1bba9c1e558a3f..b28f3ccbd9dfbd5822197a7b6f466810c471dfe4 100644 (file)
@@ -40,13 +40,14 @@ Skip the download with [BootstrapCDN](https://www.bootstrapcdn.com/) to deliver
 
 {{< highlight html >}}
 <link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
-<script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
+<script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
 {{< /highlight >}}
 
-If you're using our compiled JavaScript, don't forget to include Popper.js, via a CDN preferably, before our JS.
+If you're using our compiled JavaScript and prefer to include Popper.js separately, don't forget to include Popper.js before our JS, via a CDN preferably.
 
 {{< highlight html >}}
 <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
+<script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
 {{< /highlight >}}
 
 ## Package managers
index 3945cb265ed7f9906f5a4f4eca885169f21a411f..e1199c7e80039c825b1bb95b1acd36ea763b2e2e 100644 (file)
@@ -24,7 +24,11 @@ Copy-paste the stylesheet `<link>` into your `<head>` before all other styleshee
 
 ### JS
 
-Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper.js](https://popper.js.org/). Place the following `<script>`s near the end of your pages, right before the closing `</body>` tag, to enable them. Popper.js must come first, and then our JavaScript plugins.
+Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper.js](https://popper.js.org/). Place **one of following `<script>`s** near the end of your pages, right before the closing `</body>` tag, to enable them. If you decide to go with the separate scripts solution, Popper.js must come first, and then our JavaScript plugins.
+
+{{< highlight html >}}
+<script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
+{{< /highlight >}}
 
 {{< highlight html >}}
 <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
@@ -59,8 +63,11 @@ Be sure to have your pages set up with the latest design and development standar
   <body>
     <h1>Hello, world!</h1>
 
-    <!-- Optional JavaScript -->
-    <!-- Popper.js first, then Bootstrap JS -->
+    <!-- Optional JavaScript; choose one of the two! -->
+    <!-- Bootstrap Bundle with Popper.js -->
+    <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
+
+    <!-- Or Popper.js first, then Bootstrap JS -->
     <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
     <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
   </body>
index 53acd1eb59b57f37e95a70ab939710d490eabfba..0c4d6f0ad6b08ed3715865d24323d5bdac3cdc22 100644 (file)
@@ -34,7 +34,9 @@
     <div class="col-md-7 pl-md-5">
       {{ highlight (printf (`<!-- CSS only -->
 <link rel="stylesheet" href="%s" integrity=%q crossorigin="anonymous">`) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }}
-      {{ highlight (printf (`<!-- JavaScript and dependencies -->
+      {{ highlight (printf (`<!-- JavaScript Bundle with Popper.js -->
+<script src="%s" integrity=%q crossorigin="anonymous"></script>`) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }}
+      {{ highlight (printf (`<!-- Or Popper.js and our JavaScript file separately -->
 <script src="%s" integrity=%q crossorigin="anonymous"></script>
 <script src="%s" integrity=%q crossorigin="anonymous"></script>
 `) .Site.Params.cdn.popper (.Site.Params.cdn.popper_hash | safeHTMLAttr) .Site.Params.cdn.js (.Site.Params.cdn.js_hash | safeHTMLAttr)) "html" "" }}