hexo-theme-icarus 国内加速

hexo-theme-icarus 国内加速

加速源:https://css.loli.net/

CDN

includes\helpers\cdn.js

1
2
3
4
5
6
7
8
const cdn_providers = {
cdnjs: 'https://cdnjs.cloudflare.com/ajax/libs/${ package }/${ version }/${ filename }'
};

// 修改为
const cdn_providers = {
cdnjs: 'https://cdnjs.loli.net/ajax/libs/${ package }/${ version }/${ filename }',
};

Fonts

includes\helpers\cdn.js

1
2
3
4
5
6
7
8
const font_providers = {
google: 'https://fonts.googleapis.com/${ type }?family=${ fontname }'
};

// 修改为
const font_providers = {
google: 'https://fonts.loli.net/${ type }?family=${ fontname }'
};

Font Awesome

从3月份开始,CDNJS 加入了 Font Awesome 5 的更新,详情

includes\helpers\cdn.js

1
2
3
4
5
6
7
8
const icon_providers = {
fontawesome: 'https://use.fontawesome.com/releases/v5.4.1/css/all.css'
};

// 修改为
const icon_providers = {
fontawesome: 'https://cdnjs.loli.net/ajax/libs/font-awesome/5.4.1/css/all.min.css'
};

gravatar

layout\widget\profile.ejs

1
2
3
4
gravatar(gravatar_email, 128);

// 修改为
gravatar(gravatar_email, 128).replace(/https:\/\/.*.gravatar.com/g, 'https://gravatar.loli.net');

评论

往上