Allow JsDelivr CDN user to select domain to use for CDN

Created on 2 May 2024, about 2 months ago

Problem/Motivation

The domain cdn.jsdelivr.net has encountered SSL certificate issue. This cause all bootstrap / drupal-bootstrap assets to fail and the theme / subthemes broke down.

For similar issue, reference:
https://stackoverflow.com/questions/78416801/invalid-certificate-for-htt...

Steps to reproduce

  1. Just go to any site with bootstrap subtheme (8.x-3.x) and clear cache; or Install a new copy of Drupal with a bootstrap 8.x-3.x subtheme.
  2. Enable the theme.
  3. In theme setting, select "JsDelivr" as your CDN provider.

The style of bootstrap elements, most notably the menu button, will be broken.

Proposed resolution

Wile the domain cdn.jsdelivr.net failed, the alternative domain gcore.jsdelivr.net, fastly.jsdelivr.net (and perhaps cdnjs.cloudflare.com) still work.

The quicker way to "fix" is to subclass "Drupal\bootstrap\Plugin\Provider\JsDelivr". Overriding the method getCdnUrlTemplate() with a domain modified option.

A more profound way would be to allow provider to have further settings of the CDN domain to use for jsdelivr.

Remaining tasks

Decide which to do and then implement it.

User interface changes

Depends. Could have new appearance settings for the theme.

API changes

Probably none

Data model changes

Probably none

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡­πŸ‡°Hong Kong yookoala

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024