BootstrapCDN is the easiest and fastest way to get started with Bootstrap, Font Awesome, Bootswatch and Bootstrap Icons. Simply visit the main site and copy the URLs you need. New versions of all projects are pulled directly from NPM.
Or follow the instructions bellow for more advanced use cases.
These will pull the 4.6.0
version. It is safe to use SRI with static versions like this.
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
To auto-update to latest minor version you can specify for example 4
as the version in the URL.
You will then get the latest v4 version available with a delay of up to 7 days.
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.bundle.min.js"></script>
Warning: Do not use SRI hashes with dynamic URLs like this or the next update will break your site.
A more detailed documentation is available on jsDelivr's Github page.
For certain use-cases it is possible to automate updates using our API. You can use it to get the list of versions available on the CDN including the latest one.
https://data.jsdelivr.com/v1/package/npm/bootstrap
{
"tags": {
"latest": "4.6.0",
"previous": "3.4.1",
"next": "5.0.0-beta2"
},
"versions": [
"5.0.0-beta2",
...
"4.6.0",
...
]
}
Use npm run <task>
.
npm install
npm test && npm run dev
# start development server and watch for changes
npm run dev
# or
npm run watch
# start production server
npm start
# and more
npm run
config/_app.yml
The Express.js app configuration.
bootswatch4
section below.@
url
bellowfavicon.ico
.config/_files.yml
Contains the CDN files we host.The SRI values are updated by running npm run integrity
.
config/helmet-csp.js
Our CSP config using https://github.com/helmetjs/csp
Replace package
by the package you want to update and version
with its version in the following commands:
npm i package@version -ED
npm run package version
config/_config.yml
accordinglynpm run integrity
npm run all
passes after the files are on S3/CDN and verify the frontend works as expected without any visual breakage