From 8be7ac056afd5870c562a288061202cd9c45c3b2 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 14 Jul 2020 19:21:39 +0300 Subject: [PATCH 1/4] docs: mention our bundle file clearly. Note that we are using the bundle file already in our docs since 787441d. --- site/content/docs/5.0/getting-started/download.md | 5 +++-- .../docs/5.0/getting-started/introduction.md | 13 ++++++++++--- site/layouts/partials/home/masthead-followup.html | 4 +++- 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 e4a293e5d853..b28f3ccbd9df 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 >}} }}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> - + {{< /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 >}} + {{< /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 3945cb265ed7..e1199c7e8003 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 `` into your `` 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 ` +{{< /highlight >}} {{< highlight html >}} @@ -59,8 +63,11 @@ Be sure to have your pages set up with the latest design and development standar

Hello, world!

- - + + + + + diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html index 53acd1eb59b5..0c4d6f0ad6b0 100644 --- a/site/layouts/partials/home/masthead-followup.html +++ b/site/layouts/partials/home/masthead-followup.html @@ -34,7 +34,9 @@

BootstrapCDN

{{ highlight (printf (` `) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }} - {{ highlight (printf (` + {{ highlight (printf (` +`) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }} + {{ highlight (printf (` `) .Site.Params.cdn.popper (.Site.Params.cdn.popper_hash | safeHTMLAttr) .Site.Params.cdn.js (.Site.Params.cdn.js_hash | safeHTMLAttr)) "html" "" }} From 98a3b99a322a96950e9c09d788ee4a9bad2c68c5 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 4 Aug 2020 08:40:24 +0300 Subject: [PATCH 2/4] Update site/content/docs/5.0/getting-started/download.md Co-authored-by: Mark Otto --- site/content/docs/5.0/getting-started/download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/5.0/getting-started/download.md b/site/content/docs/5.0/getting-started/download.md index b28f3ccbd9df..5c710c2fb4de 100644 --- a/site/content/docs/5.0/getting-started/download.md +++ b/site/content/docs/5.0/getting-started/download.md @@ -43,7 +43,7 @@ Skip the download with [BootstrapCDN](https://www.bootstrapcdn.com/) to deliver {{< /highlight >}} -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. +If you're using our compiled JavaScript and prefer to include Popper.js separately, add Popper.js before our JS, via a CDN preferably. {{< highlight html >}} From 2fdd6d0242dfefbab2e609460845fdcb672a3e74 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 14 Sep 2020 15:19:29 -0700 Subject: [PATCH 3/4] Rewrite quick start JS sections in getting started page so things are more clearly organized --- .../docs/5.0/getting-started/introduction.md | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/site/content/docs/5.0/getting-started/introduction.md b/site/content/docs/5.0/getting-started/introduction.md index e1199c7e8003..5e93872965b2 100644 --- a/site/content/docs/5.0/getting-started/introduction.md +++ b/site/content/docs/5.0/getting-started/introduction.md @@ -24,22 +24,32 @@ Copy-paste the stylesheet `` into your `` 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 **one of following ` {{< /highlight >}} +#### Separate + +If you decide to go with the separate scripts solution, Popper.js must come first, and then our JavaScript plugins. + {{< highlight html >}} {{< /highlight >}} +#### Modules + If you use ` - + {{< /highlight >}} From 1fb8107d7f0e927354fcc149948d6a8078e00715 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 14 Sep 2020 15:21:31 -0700 Subject: [PATCH 4/4] Rremove separate JS includes from homepage for simplicity's sake, but include a link to doing it separately --- site/layouts/partials/home/masthead-followup.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html index 0c4d6f0ad6b0..ebc44b745100 100644 --- a/site/layouts/partials/home/masthead-followup.html +++ b/site/layouts/partials/home/masthead-followup.html @@ -27,7 +27,7 @@

BootstrapCDN

When you only need to include Bootstrap’s compiled CSS or JS, you can use BootstrapCDN.

- See it in action with our simple starter template, or browse the examples to jumpstart your next project. + See it in action with our simple starter template, or browse the examples to jumpstart your next project. You can also choose to include Popper.js and our JS separately.

Explore the docs
@@ -36,10 +36,6 @@

BootstrapCDN

`) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }} {{ highlight (printf (` `) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }} - {{ highlight (printf (` - - -`) .Site.Params.cdn.popper (.Site.Params.cdn.popper_hash | safeHTMLAttr) .Site.Params.cdn.js (.Site.Params.cdn.js_hash | safeHTMLAttr)) "html" "" }}