Allow changing CDN provider by user to solve problem where default CDN is blocked countrywise #12120
Labels
enhancement
New feature or request
html
Issues with HTML and related web technology (html/css/scss)
ojs-engine
Issues with the ojs engine
search
Milestone
Discussed in #12109
Originally posted by skyfroger February 18, 2025
Description
I have issues reaching cdn.jsdelivr.net in my country. So I am getting errors while trying to render MathJax formulast and inster OJS interactive elements. Is there are an option to change default CDN provider?
Context
I believe Quarto should try to be friendly as possible with users wherever they are. Currently,
cdn.jsdelivr.net
is used by default in several placesMathjax / KaTeX
quarto-cli/src/command/render/template.ts
Lines 225 to 235 in ec8cd58
This one can already be customized through
html-math-method
configuration by providing a full new URLSearch with Algolia
It is using
cdn.jsdelivr.net
by default with no customizationquarto-cli/src/project/types/website/website-search.ts
Lines 695 to 718 in ec8cd58
OJSNote
EDIT: For OJS this is not possible as we inherit from ObservableHQ directly (#12120 (comment))
I see
quarto-cli/src/resources/formats/html/ojs/quarto-ojs-runtime.js
Lines 256 to 257 in ec8cd58
which probably is related to how NPM package are served: https://quarto.org/docs/interactive/ojs/libraries.html#npm
This is the real problem encountered in #12109
This would be another part to make it configurable if possible 🤷♂
Current workaround
Currently doing a post processing to replace the CDN used in
quarto-os-runtime.js
or other fileThe text was updated successfully, but these errors were encountered: