mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
All plugins are available on CDNJS
This commit is contained in:
parent
aae3ab8dbd
commit
968ac54906
@ -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'
|
||||
|
||||
@ -75,7 +75,7 @@ const points = {
|
||||
]
|
||||
};
|
||||
|
||||
// Required by theme-next-docs
|
||||
// Required by theme-next-docs and @next-theme/plugins
|
||||
module.exports = {
|
||||
resolve,
|
||||
highlightTheme,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user