• Stars
    star
    1,349
  • Rank 34,821 (Top 0.7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Free Bootstrap CDN hosting

BootstrapCDN

bootstrap-github-cover

jsDelivr Download Stats Build Status Coverage Status dependencies Status devDependencies Status

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.

Example CDN links

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/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">

<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

Version aliasing

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.

Using the API to pull versions

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",
...
	]
}

Contributing

Requirements

  1. Node.js

Running

Use npm run <task>.

Development

npm install

npm test && npm run dev

Demonized

# start development server and watch for changes
npm run dev
# or
npm run watch

# start production server
npm start

# and more
npm run

Configuration

config/_app.yml

The Express.js app configuration.

  • port: Integer value of the Node application port.
  • theme: Integer value of the default theme we use; it's the array index value from the bootswatch4 section below.
  • siteurl: Our canonical URL.
  • authors: Array of author Objects. Accepts the following:
    • name
    • twitter: the Twitter handler without @
    • url: author's website URL (optional)
    • work: (optional) Object which can contain:
      • text: the text to show for the url bellow
      • url: the link to the work
  • description: String containing the default meta description of the site.
  • favicon: The path to favicon.ico.
  • stylesheet: Array of stylesheet file(s) we use apart from the Bootswatch stylesheet.
  • javascript: Array of javascript file(s) we use.
  • redirects: Array of Objects for the page redirects.

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

Updating Bootstrap/Bootlint/Bootswatch

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
  1. Update config/_config.yml accordingly
  2. npm run integrity
  3. Make sure npm run all passes after the files are on S3/CDN and verify the frontend works as expected without any visual breakage

More Repositories

1

jsdelivr

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM
JavaScript
5,571
star
2

globalping

A global network of probes to run network tests like ping, traceroute and DNS resolve
TypeScript
241
star
3

FontFamous

Font Famous is the free vector media logo font.
Less
223
star
4

data.jsdelivr.com

The public jsDelivr API. Get npm packages, files, versions, entry points, as well as their CDN URLs and download stats.
JavaScript
205
star
5

globalping-cli

A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers
Go
143
star
6

www.jsdelivr.com

The official jsDelivr website
HTML
139
star
7

api

DEPRECATED - API for public CDNs
JavaScript
113
star
8

globalping-probe

The globalping probe code that runs on your hardware and connects to the global community network of probes
TypeScript
77
star
9

dns-openmix

DEPRECATED - jsDelivr's load balancing algorithm
JavaScript
50
star
10

unplugin-jsdelivr

Use jsDelivr in Vite, Rollup, Webpack and esbuild!
TypeScript
36
star
11

bot

DEPRECATED The jerk of a bot that checks PRs and responds in comments
Python
22
star
12

plugin-intellij

jsDelivr plugin for JetBrains IntelliJ based editors
Java
22
star
13

plugin-vs-code

Quickly insert any npm package from jsDelivr CDN
JavaScript
20
star
14

libgrabber

DEPRECATED Keeps projects hosted in jsDelivr updated
JavaScript
20
star
15

extension-chrome

JavaScript
16
star
16

globalping-hwprobe

OS image for Globalping hardware probes. Become a GitHub Sponsor to get yours!
Shell
15
star
17

foundationcdn

DEPRECATED The code for the website at
CSS
15
star
18

plugin-atom

jsDelivr plugin for Atom
JavaScript
8
star
19

ghost-jsdelivr-theme

The Ghost theme for jsDelivr's blog
SCSS
3
star
20

jsdelivr-media

jsDelivr logo files
3
star
21

api-sync

DEPRECATED Sync portion for jsDelivr API
JavaScript
3
star
22

dns-openmix-diagnostics

DEPRECATED
JavaScript
1
star
23

cleaner

DEPRECATED Remove content of files in a repo
Python
1
star
24

.github

1
star
25

all-the-package-types

JavaScript
1
star
26

globalping-dash

Globalping's official dashboard and probe control panel
JavaScript
1
star
27

dash-directus

The jsDelivr dashboard backend
TypeScript
1
star