All plugins are available on CDNJS

This commit is contained in:
Mimi 2022-03-27 15:07:17 +08:00
parent aae3ab8dbd
commit 968ac54906
3 changed files with 2 additions and 5 deletions

View File

@ -172,8 +172,6 @@ canvas_ribbon:
name: ribbon.js
version: 1.0.2
file: dist/ribbon.min.js
unavailable:
- cdnjs
integrity: sha256-UkSSapoJqxvq+8bSCIrAhXO+aOMBRmkK6vxjTstemLs=
creative_commons:
name: '@creativecommons/vocabulary'

View File

@ -75,7 +75,7 @@ const points = {
]
};
// Required by theme-next-docs
// Required by theme-next-docs and @next-theme/plugins
module.exports = {
resolve,
highlightTheme,

View File

@ -34,7 +34,7 @@ module.exports = hexo => {
if (key === 'pace_css') {
value.file = `${value.dir}/${pace.color}/pace-theme-${pace.theme}.css`;
}
const { name, file, unavailable } = value;
const { name, file } = value;
const links = getVendors({
...value,
minified: file,
@ -42,7 +42,6 @@ module.exports = hexo => {
custom : vendors.custom_cdn_url
});
let { plugins = 'jsdelivr' } = vendors;
if (plugins === 'cdnjs' && unavailable && unavailable.includes('cdnjs')) plugins = 'jsdelivr';
if (plugins === 'local' && typeof internal === 'undefined') plugins = 'jsdelivr';
vendors[key] = {
url : links[plugins] || links.jsdelivr,