mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
parent
f860dcebc2
commit
8b4b4004c1
@ -883,5 +883,7 @@ vendors:
|
|||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
# Accelerate delivery of static files using a CDN
|
# Accelerate delivery of static files using a CDN
|
||||||
|
# The js option is only valid when vendors.internal is local.
|
||||||
css: css
|
css: css
|
||||||
|
js: js
|
||||||
images: images
|
images: images
|
||||||
|
|||||||
@ -25,7 +25,7 @@ hexo.extend.helper.register('next_js', function(file, pjax = false) {
|
|||||||
version : next_version,
|
version : next_version,
|
||||||
file : 'source/js/' + file,
|
file : 'source/js/' + file,
|
||||||
minified: 'source/js/' + file.replace(/\.js$/, '.min.js'),
|
minified: 'source/js/' + file.replace(/\.js$/, '.min.js'),
|
||||||
local : this.url_for(`js/${file}`),
|
local : this.url_for(`${this.theme.js}/${file}`),
|
||||||
custom : custom_cdn_url
|
custom : custom_cdn_url
|
||||||
});
|
});
|
||||||
const src = links[internal] || links.local;
|
const src = links[internal] || links.local;
|
||||||
@ -55,7 +55,7 @@ hexo.extend.helper.register('next_pre', function() {
|
|||||||
const { enable, host } = this.theme.font;
|
const { enable, host } = this.theme.font;
|
||||||
const { internal, plugins, custom_cdn_url } = this.theme.vendors;
|
const { internal, plugins, custom_cdn_url } = this.theme.vendors;
|
||||||
const links = {
|
const links = {
|
||||||
local : '',
|
local : parse(this.theme.js || '').hostname,
|
||||||
jsdelivr: 'https://cdn.jsdelivr.net',
|
jsdelivr: 'https://cdn.jsdelivr.net',
|
||||||
unpkg : 'https://unpkg.com',
|
unpkg : 'https://unpkg.com',
|
||||||
cdnjs : 'https://cdnjs.cloudflare.com',
|
cdnjs : 'https://cdnjs.cloudflare.com',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user