mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 21:40:48 +00:00
docs: switch to suggesting jsDelivr as a CDN (#31894)
This commit is contained in:
parent
5ee5792579
commit
28f18f84a7
@ -68,11 +68,11 @@ params:
|
|||||||
|
|
||||||
cdn:
|
cdn:
|
||||||
# See https://www.srihash.org for info on how to generate the hashes
|
# See https://www.srihash.org for info on how to generate the hashes
|
||||||
css: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/css/bootstrap.min.css"
|
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha2/dist/css/bootstrap.min.css"
|
||||||
css_hash: "sha384-DhY6onE6f3zzKbjUPRc2hOzGAdEf4/Dz+WJwBvEYL/lkkIsI3ihufq9hk9K4lVoK"
|
css_hash: "sha384-DhY6onE6f3zzKbjUPRc2hOzGAdEf4/Dz+WJwBvEYL/lkkIsI3ihufq9hk9K4lVoK"
|
||||||
js: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.min.js"
|
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha2/dist/js/bootstrap.min.js"
|
||||||
js_hash: "sha384-5h4UG+6GOuV9qXh6HqOLwZMY4mnLPraeTrjT5v07o347pj6IkfuoASuGBhfDsp3d"
|
js_hash: "sha384-5h4UG+6GOuV9qXh6HqOLwZMY4mnLPraeTrjT5v07o347pj6IkfuoASuGBhfDsp3d"
|
||||||
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.bundle.min.js"
|
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha2/dist/js/bootstrap.bundle.min.js"
|
||||||
js_bundle_hash: "sha384-BOsAfwzjNJHrJ8cZidOg56tcQWfp6y72vEJ8xQ9w6Quywb24iOsW913URv1IS4GD"
|
js_bundle_hash: "sha384-BOsAfwzjNJHrJ8cZidOg56tcQWfp6y72vEJ8xQ9w6Quywb24iOsW913URv1IS4GD"
|
||||||
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
||||||
popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
||||||
|
@ -27,7 +27,7 @@ There are multiple ways to customize Bootstrap. Your best path can depend on you
|
|||||||
Our two preferred methods are:
|
Our two preferred methods are:
|
||||||
|
|
||||||
1. Using Bootstrap [via package manager]({{< docsref "/getting-started/download#package-managers" >}}) so you can use and extend our source files.
|
1. Using Bootstrap [via package manager]({{< docsref "/getting-started/download#package-managers" >}}) so you can use and extend our source files.
|
||||||
2. Using Bootstrap's compiled distribution files or the [BootstrapCDN]({{< docsref "/getting-started/download#bootstrapcdn" >}}) so you can add onto or override Bootstrap's styles.
|
2. Using Bootstrap's compiled distribution files or [jsDelivr]({{< docsref "/getting-started/download#cdn-via-jsdelivr" >}}) so you can add onto or override Bootstrap's styles.
|
||||||
|
|
||||||
While we cannot go into details here on how to use every package manager, we can give some guidance on [using Bootstrap with your own Sass compiler]({{< docsref "/customize/sass" >}}).
|
While we cannot go into details here on how to use every package manager, we can give some guidance on [using Bootstrap with your own Sass compiler]({{< docsref "/customize/sass" >}}).
|
||||||
|
|
||||||
|
@ -34,9 +34,9 @@ If you want to download and examine our [examples]({{< docsref "/examples" >}}),
|
|||||||
|
|
||||||
<a href="{{< param "download.dist_examples" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Examples');">Download Examples</a>
|
<a href="{{< param "download.dist_examples" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Examples');">Download Examples</a>
|
||||||
|
|
||||||
## BootstrapCDN
|
## CDN via jsDelivr
|
||||||
|
|
||||||
Skip the download with [BootstrapCDN](https://www.bootstrapcdn.com/) to deliver cached version of Bootstrap's compiled CSS and JS to your project.
|
Skip the download with [jsDelivr](https://www.jsdelivr.com/) to deliver cached version of Bootstrap's compiled CSS and JS to your project.
|
||||||
|
|
||||||
{{< highlight html >}}
|
{{< highlight html >}}
|
||||||
<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
|
<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: docs
|
layout: docs
|
||||||
title: Introduction
|
title: Introduction
|
||||||
description: Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.
|
description: Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page.
|
||||||
group: getting-started
|
group: getting-started
|
||||||
aliases:
|
aliases:
|
||||||
- "/docs/5.0/getting-started/"
|
- "/docs/5.0/getting-started/"
|
||||||
@ -12,7 +12,7 @@ toc: true
|
|||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
Looking to quickly add Bootstrap to your project? Use BootstrapCDN, provided for free by the folks at StackPath. Using a package manager or need to download the source files? [Head to the downloads page]({{< docsref "/getting-started/download" >}}).
|
Looking to quickly add Bootstrap to your project? Use jsDelivr, a free open source CDN. Using a package manager or need to download the source files? [Head to the downloads page]({{< docsref "/getting-started/download" >}}).
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
<div class="masthead-followup-icon d-inline-block mb-2 text-white bg-primary">
|
<div class="masthead-followup-icon d-inline-block mb-2 text-white bg-primary">
|
||||||
{{ partial "icons/cloud-fill.svg" (dict "width" "32" "height" "32") }}
|
{{ partial "icons/cloud-fill.svg" (dict "width" "32" "height" "32") }}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="display-5 font-weight-normal">BootstrapCDN</h2>
|
<h2 class="display-5 font-weight-normal">jsDelivr</h2>
|
||||||
<p class="lead font-weight-normal">
|
<p class="lead font-weight-normal">
|
||||||
When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.bootstrapcdn.com/">BootstrapCDN</a>.
|
When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.jsdelivr.com/">jsDelivr</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
See it in action with our simple <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#starter-template">starter template</a>, or <a href="/docs/{{ .Site.Params.docs_version }}/examples/">browse the examples</a> to jumpstart your next project. You can also choose to include Popper.js and our JS <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#separate">separately</a>.
|
See it in action with our simple <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#starter-template">starter template</a>, or <a href="/docs/{{ .Site.Params.docs_version }}/examples/">browse the examples</a> to jumpstart your next project. You can also choose to include Popper.js and our JS <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#separate">separately</a>.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user