Skip to content

fix: change default CDN source from bootcdn to unpkg for global reliability#516

Open
ratava wants to merge 1 commit into
kitian616:masterfrom
ratava:fix/default-cdn-unpkg
Open

fix: change default CDN source from bootcdn to unpkg for global reliability#516
ratava wants to merge 1 commit into
kitian616:masterfrom
ratava:fix/default-cdn-unpkg

Conversation

@ratava

@ratava ratava commented Apr 5, 2026

Copy link
Copy Markdown

Problem

cdn.bootcss.com is 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:

Loading failed for the <script> with source "https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"

Fix

Change the default sources value in _data/variables.yml from bootcdn to unpkg.

-  sources: bootcdn
+  sources: unpkg

The unpkg source 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: bootcdn in their _config.yml.

Testing

  • Verified unpkg source set is complete and covers all the same libraries as bootcdn
  • Search, Font Awesome icons, and other CDN-dependent features work correctly with sources: unpkg

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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant