mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
docs: mention our bundle file clearly.
Note that we are using the bundle file already in our docs since 787441d
.
This commit is contained in:
parent
94c0f12329
commit
7571fe73b6
3 changed files with 16 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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" "" }}
|
||||
|
|
Loading…
Reference in a new issue