Giter VIP home page Giter VIP logo

bootstrapcdn's Introduction

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

bootstrapcdn's People

Contributors

auscompgeek avatar benschell avatar bmconklin avatar caasig avatar cassiux avatar cvrebert avatar dependabot-preview[bot] avatar dependabot[bot] avatar disko998 avatar flashtopia avatar gitter-badger avatar it-can avatar jdorfman avatar jensenbox avatar jimaek avatar jmervine avatar johann-s avatar karloespiritu avatar krinkle avatar mimic84 avatar paullaros avatar peterdavehello avatar philbrown avatar thomaspark avatar tjasko avatar tobsn avatar xbpcb avatar xhmikosr avatar zarianec avatar zoltanszogyenyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrapcdn's Issues

Font Awesome always downloads fonts over https

Taken from http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css

@font-face{
    font-family:FontAwesome;
    src:url(https://netdna.bootstrapcdn.com/font-awesome/2.0/font//fontawesome-webfont.eot?#iefix) format('eot'),
    url(https://netdna.bootstrapcdn.com/font-awesome/2.0/font//fontawesome-webfont.woff) format('woff'),
    url(https://netdna.bootstrapcdn.com/font-awesome/2.0/font//fontawesome-webfont.ttf) format('truetype'),
    url(https://netdna.bootstrapcdn.com/font-awesome/2.0/font//fontawesome-webfont.svg#FontAwesome) format('svg');
    font-weight:400;font-style:normal;}

Is there a reason we are not using relate urls?

Question

Working on a plugin for WordPress users to bring in the additional functionality of the JS plugins and associated CSS, once we get a minified file, any chance of you guys adding it to your available CSS options on BootstrapCDN?

The file doesn't include the CSS that WordPress themes already supply, such as the responsive, the resets, headings etc
Just trying to minimize some of the conflicts for users of the WP plugin.

Thanks!

How to fallback the CSS and JS loaded from bootstrap-CDN to local URL ?

In some environment the bootstrap-cdn site is blocked so the CSS and JS cannot been loaded. In this case, how to check the unavailable of bootstrap-CDN and fallback to a local URL. E.g., We can check if there is a JQuery object to be sure jquery is loaded from a CDN. What varible can we check for bootstrap?

Font Awesome hosted in the CDN is not working for IE9 and IE8&7 mode

The browser just displays the icons as squares as if they're missing the font.
From what I can tell, the hosted version is missing 1 line compared to the official version
Second, the mimetype of the font files received in the browser are different than the official version in github:
eot, ttf and woff are application/octet-stream in the official github

A lot of the hosted files are hard to find.

Prettify

Going to add Prettify support. More TBA

loading font-awsome from CDN does not work under IE browsers below ver 9.0

I ecountered this problem and saw this below in this issue:

IE9 works fine but IE8 just gives boxes or hex depending on its mode. Works fine in all other >browsers. The font-awesome site displays correctly in IE8.

I guess maybe it is the sake of same-origin policy, which makes IE lower than 9.0 can not load fonts from CDN. Hope anyone to solve this issue, thanks a lot.

"Latest"

I love your service, so I'm using it on four or five of my projects. The only trouble is, whenever there is a version update, I have to open each project, update the link(s), and then re-upload the files.

Would it be possible to have, instead of this:

... something like this:

Thanks again for making these files available like this.

Paths/Names are incorrect

//netdna.bootstrapcdn.com/bootswatch/2.1.0/journal/bootstrap.min.css doesn't actually point to the journal theme, and so on :(

Bootswatch 2.2.1 build, can we get the no-icons CDN version?

Hello,

I noticed there was a 2.2.1 build of the bootswatch themes, but I wondered if we can ask for a no-icons CDN version now...

Again many, many thanks for hosting all these.... I use them all and the CDN versions make it super clean and simple to make things with all these

Bravo!

Tooltips are 100% Opacity

For some reason in either version (icon or no-icon) of the minified source, the rule for .tooltip.in (line 737 in bootstrap-combined.min.css and line 595 in bootstrap.no-icons.min.css) occurs before the rule for .fade.in (lines 834 and 692, respectively). This causes all tooltips to fade in to 100% opacity, rather than the intended 80% opacity.

In the original minified and non-minified versions, these are reversed ( .tooltip.in is line 5003 unminified and .fade.in is line 2978; both are on line 9 in the minified version, though in the proper order).

Looks like the minifier you're using is rearranging elements, which it definitely should not be doing. This is the only instance I've run into, but I'm sure there are more out of 5774 lines of CSS...

Font-Awesome not loading from CDN in IE8

IE9 works fine but IE8 just gives boxes or hex depending on its mode. Works fine in all other browsers. The font-awesome site displays correctly in IE8. I wonder if there is a path issue for the .eot file that IE8 will be trying to load?

Combine & minify

Why responsice.css is not minified (or have not minified version)?

Also why there is no combined/minified link to all javascripts in one file?

Move font-awesome-protocol-less.css to font-awesome.css

I dont think there's a great reason to keep a separate adaptive protocol version of font awesome around.

Thoughts on making font-awesome-protocol-less.css the default version of font-awesome.css?

I think otherwise, this might just surprise people with the extra overhead of SSL negotiation.

font-awesome still playing up in firefox

I am still not getting characters to load when I use the CDN font-awesome with Firefox. I notice that the minimised CSS file has had all the quotes stripped out of it :

src: url(../font/fontawesome-webfont.eot);

There is a suggestion floating round the net that these quotes need to be in there, so I made a local css file that included the quotes but linked to the font files on the CDN and it worked fine.

I think your CSS minimiser is stripping out quotes when it shouldn't be or something.

2.1.0 css not found

//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap.min.css is 404'ing. The js for 2.1.0 is there but not the css.

font-awesome not loading fonts with Firefox

Firefox and IE need some header settings before web-fonts will load properly. Chrome and Safari seem to be fine.

<FilesMatch ".(ttf|otf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>

location ~* .(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}

Not sure how to attach a screenshot in this system! But if you go to http://catless.ncl.ac.uk/cs-mobile in Firefox or IE you should be able to see it happen : the search icon and the left and right arrows on the carousel show as boxes rather than icons

css image links point to ../img

in a perfect world
url("../img/glyphicons-halflings.png")
should point to
url("//netdna.bootstrapcdn.com/twitter-bootstrap/{REQUESTED-VERSION}/img/glyphicons-halflings.png")

Help Section

A help page that will show newbies how to get started.

Bootswatch "no-icons" version as well?

Hey,

I use Bootstrap + FontAwesome, but I'm also playing around with Bootswatch so it would be awesome to have the Bootswatch themes available without Icons so that FontAwesome works correctly :)

Thanks

Local fallback code for CSS and JS

It would be great to add local fallback code example for CSS and JS, similar to query in html5boilerplate:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.2.min.js"><\/script>')</script>

Non Responsive, No Icons

I assumed (by process of elimination) that the link labelled "Complete Bootstrap CSS (Without Icons)" would be non responsive. This does not appear to be the case, so is it in fact the same as "Complete CSS (Responsive, With Icons)"?

Provide no-icons for 2.0.4

Could you please provide...

//netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap.no-icons.min.css

...for 2.0.4 as well.

2.1 is very buggy and moving back to 2.0.4 solved the bugs we have encountered in 2.1.

Bootswatch Responsive

All of the Bootswatch styles are nice, but dont seem to play well with the responsive layout.

Major(minor) version links

It will be very cool if there will be links to versions of bootstrap like in google cdn.

Something like this one for jQuery:

https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js

So i do not ever need update my projects, as i know that i'm using latest version

WPO

Web Page Optimization:

bootstrap-responsive.min.css not found using CDN

It seems the latest version of Bootstrap is broken on the CDN, assuming this should work:

curl -i 'https://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap-responsive.min.css'

I get a 404 Error on my end. I'm reporting this because I got a bug report myself at mbr/flask-bootstrap#4, which I believe I can't fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.