aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2020-07-14 19:21:39 +0300
committerXhmikosR <[email protected]>2020-09-15 08:57:19 +0300
commit7571fe73b619628c31eae8edb63d719ede9a900b (patch)
treeca5208cd3f3e6d2582747741ef5bee34c1f0bef0
parent94c0f12329820494c39fe7c213866620416d0b38 (diff)
downloadbootstrap-7571fe73b619628c31eae8edb63d719ede9a900b.tar.xz
bootstrap-7571fe73b619628c31eae8edb63d719ede9a900b.zip
docs: mention our bundle file clearly.
Note that we are using the bundle file already in our docs since 787441d.
-rw-r--r--site/content/docs/5.0/getting-started/download.md5
-rw-r--r--site/content/docs/5.0/getting-started/introduction.md13
-rw-r--r--site/layouts/partials/home/masthead-followup.html4
3 files changed, 16 insertions, 6 deletions
diff --git a/site/content/docs/5.0/getting-started/download.md b/site/content/docs/5.0/getting-started/download.md
index e4a293e5d..b28f3ccbd 100644
--- a/site/content/docs/5.0/getting-started/download.md
+++ b/site/content/docs/5.0/getting-started/download.md
@@ -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
diff --git a/site/content/docs/5.0/getting-started/introduction.md b/site/content/docs/5.0/getting-started/introduction.md
index 3945cb265..e1199c7e8 100644
--- a/site/content/docs/5.0/getting-started/introduction.md
+++ b/site/content/docs/5.0/getting-started/introduction.md
@@ -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>
diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html
index 53acd1eb5..0c4d6f0ad 100644
--- a/site/layouts/partials/home/masthead-followup.html
+++ b/site/layouts/partials/home/masthead-followup.html
@@ -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" "" }}