mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-19 18:42:34 +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
|
name: ribbon.js
|
||||||
version: 1.0.2
|
version: 1.0.2
|
||||||
file: dist/ribbon.min.js
|
file: dist/ribbon.min.js
|
||||||
unavailable:
|
|
||||||
- cdnjs
|
|
||||||
integrity: sha256-UkSSapoJqxvq+8bSCIrAhXO+aOMBRmkK6vxjTstemLs=
|
integrity: sha256-UkSSapoJqxvq+8bSCIrAhXO+aOMBRmkK6vxjTstemLs=
|
||||||
creative_commons:
|
creative_commons:
|
||||||
name: '@creativecommons/vocabulary'
|
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 = {
|
module.exports = {
|
||||||
resolve,
|
resolve,
|
||||||
highlightTheme,
|
highlightTheme,
|
||||||
|
|||||||
@ -34,7 +34,7 @@ module.exports = hexo => {
|
|||||||
if (key === 'pace_css') {
|
if (key === 'pace_css') {
|
||||||
value.file = `${value.dir}/${pace.color}/pace-theme-${pace.theme}.css`;
|
value.file = `${value.dir}/${pace.color}/pace-theme-${pace.theme}.css`;
|
||||||
}
|
}
|
||||||
const { name, file, unavailable } = value;
|
const { name, file } = value;
|
||||||
const links = getVendors({
|
const links = getVendors({
|
||||||
...value,
|
...value,
|
||||||
minified: file,
|
minified: file,
|
||||||
@ -42,7 +42,6 @@ module.exports = hexo => {
|
|||||||
custom : vendors.custom_cdn_url
|
custom : vendors.custom_cdn_url
|
||||||
});
|
});
|
||||||
let { plugins = 'jsdelivr' } = vendors;
|
let { plugins = 'jsdelivr' } = vendors;
|
||||||
if (plugins === 'cdnjs' && unavailable && unavailable.includes('cdnjs')) plugins = 'jsdelivr';
|
|
||||||
if (plugins === 'local' && typeof internal === 'undefined') plugins = 'jsdelivr';
|
if (plugins === 'local' && typeof internal === 'undefined') plugins = 'jsdelivr';
|
||||||
vendors[key] = {
|
vendors[key] = {
|
||||||
url : links[plugins] || links.jsdelivr,
|
url : links[plugins] || links.jsdelivr,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user