ℹ️ Updated default config and CDN for frontend apps

refs https://github.com/TryGhost/Team/issues/1719

- switches default CDN from unpkg to jsDelivr for better reliability
- current config for frontend apps doesn't allow easy switching of CDN for frontend urls
- allows easy switch of base CDN for frontend apps via config
- fixes double use of version string in the config
- extends config to include url needed for loading styles for frontend app instead of hardcoded urs
This commit is contained in:
Rishabh 2022-07-25 21:47:30 +05:30 committed by Rishabh Garg
parent c376587288
commit a44460d226
2 changed files with 12 additions and 9 deletions

View File

@ -133,12 +133,18 @@
"emailAnalytics": true
},
"portal": {
"url": "https://unpkg.com/@tryghost/portal@~2.3.0/umd/portal.min.js",
"url": "https://cdn.jsdelivr.net/npm/@tryghost/portal@~{version}/umd/portal.min.js",
"version": "2.3"
},
"sodoSearch": {
"url": "https://unpkg.com/@tryghost/sodo-search@~1.0.0/umd/sodo-search.min.js",
"version": "1.0.0"
"url": "https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~{version}/umd/sodo-search.min.js",
"styles": "https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~{version}/umd/main.css",
"version": "1.0"
},
"comments": {
"url": "https://cdn.jsdelivr.net/npm/@tryghost/comments-ui@~{version}/umd/comments-ui.min.js",
"styles": "https://cdn.jsdelivr.net/npm/@tryghost/comments-ui@~{version}/umd/main.css",
"version": "0.1"
},
"editor": {
"url": ""
@ -155,9 +161,5 @@
},
"gravatar": {
"url": "https://www.gravatar.com/avatar/{hash}?s={size}&r={rating}&d={_default}"
},
"comments": {
"url": "https://unpkg.com/@tryghost/comments-ui@~0.1.0/umd/comments-ui.min.js",
"version": "0.1.0"
}
}

View File

@ -56,7 +56,8 @@
"urlCache": "test/utils/fixtures/urls"
},
"sodoSearch": {
"url": "https://unpkg.com/@tryghost/sodo-search@~0.1.0/umd/sodo-search.min.js",
"version": "0.1.0"
"url": "https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~{version}/umd/sodo-search.min.js",
"styles": "https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~{version}/umd/main.css",
"version": "1.0"
}
}