fix: change default CDN source from bootcdn to unpkg for global reliability#516
Open
ratava wants to merge 1 commit into
Open
fix: change default CDN source from bootcdn to unpkg for global reliability#516ratava wants to merge 1 commit into
ratava wants to merge 1 commit into
Conversation
cdn.bootcss.com is a Chinese CDN that is unreliable or blocked outside China, causing jQuery and other assets to fail to load and breaking search, math rendering, and other features for the majority of users. Change the default `sources` from `bootcdn` to `unpkg` so sites work out of the box worldwide. Users who specifically need bootcdn can still opt in via `sources: bootcdn` in their `_config.yml`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cdn.bootcss.comis a Chinese CDN that is unreliable or completely blocked for the majority of users outside China. This causes jQuery — and consequently search, keyboard shortcuts, and other interactive features — to silently fail to load.This is a known issue: see #108 and related discussions.
Console error seen by affected users:
Fix
Change the default
sourcesvalue in_data/variables.ymlfrombootcdntounpkg.The
unpkgsource set already exists in the theme and uses globally-accessible CDN URLs (unpkg.com,use.fontawesome.com). No other changes are needed.Users who specifically want the bootcdn URLs (e.g. users in China where unpkg may be slow) can still opt in by setting
sources: bootcdnin their_config.yml.Testing
unpkgsource set is complete and covers all the same libraries asbootcdnsources: unpkg