-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: add warning callout to add a workaround when jsDelivr is not available #39145
Docs: add warning callout to add a workaround when jsDelivr is not available #39145
Conversation
As well as cdnjs (https://cdnjs.com/) |
Yep the 3 that I've often found are jsDelivr, unpkg, and cdnjs. I can maybe mention it as well if it can be useful for folks stuck with this issue. |
One problem with this callout is that if a user were to do as it says and copy the code above the callout: <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-yvuw7Qka5HyIDWlQLof1Eh7TsntO8T9n5xVQ2fLEK8UEb47oC0LAx6N9KUadRsT8" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-AN46EzEu8aYMuLb9XLkZgyvOCua6xS1HKstfL9xcOyx+UKZYcp2Z58pZjezzj/Qc" crossorigin="anonymous"></script> ...And replace Quick test: https://stackblitz.com/edit/bootstrap-cdn-test?file=index.html Maybe link to this page as an alternative CDN instead: https://cdnjs.com/libraries/bootstrap ? |
Yeah @coliff the integrity value must be changed to Might be worth pointing to https://cdnjs.com/libraries/bootstrap instead as you said which offers a "Copy Script Tag". Changing back this PR to draft mode and I'll do the modification later on. |
Based on your comments, I've refined this warning callout message. Don't hesitate to suggest some modifications if the content is not clear/helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not make this a callout. Added a suggested edit to add before merging.
Co-authored-by: Mark Otto <markd.otto@gmail.com>
…s#39145) Co-authored-by: Mark Otto <markd.otto@gmail.com>
Description
We use (and advise to use) jsDelivr when using the CDN version of Bootstrap.
However, recently, in https://github.com/orgs/twbs/discussions/39143 or https://github.com/orgs/twbs/discussions/38782 (if I remember well, other discussions exist as well), it seems like jsDelivr is not available in some countries (might be blocked).
So this PR suggests adding a warning callout to explain it and provides a workaround with cdnjs pr unpkg which seem to be reliable resources as well.
As mentioned in the comments, cdnjs Bootstrap page provides a ready-to-use snippet that can be really a handful for folks.
Type of changes
Checklist
npm run lint
)Live previews
Related discussions