perf: reset css cdn
This commit is contained in:
parent
9dda73ce5e
commit
74aa953a41
|
@ -25,7 +25,7 @@
|
||||||
</title>
|
</title>
|
||||||
<%- __favicon_tag('images/logo.svg') %>
|
<%- __favicon_tag('images/logo.svg') %>
|
||||||
<%- css('css/style') %>
|
<%- css('css/style') %>
|
||||||
<%- __font('css/font-awesome.min.css') %>
|
<%- __css('css/font-awesome.min.css') %>
|
||||||
<%- export_config() %>
|
<%- export_config() %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,10 @@ hexo.extend.helper.register('__js', function (path) {
|
||||||
return t;
|
return t;
|
||||||
});
|
});
|
||||||
|
|
||||||
hexo.extend.helper.register('__font', function (path) {
|
hexo.extend.helper.register('__css', function (path) {
|
||||||
const _css = hexo.extend.helper.get('css').bind(hexo);
|
const _css = hexo.extend.helper.get('css').bind(hexo);
|
||||||
if (this.theme.cdn.enable) {
|
if (this.theme.cdn.enable) {
|
||||||
// return `<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/css/all.min.css">`;
|
return `<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hexo-theme-keep@${this.theme.version}/source/${path}">`;
|
||||||
return `<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/XPoet/hexo-theme-keep@master/source/${path}">`;
|
|
||||||
} else {
|
} else {
|
||||||
return _css(path);
|
return _css(path);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +78,7 @@ hexo.extend.helper.register('__font', function (path) {
|
||||||
hexo.extend.helper.register('__favicon_tag', function (path) {
|
hexo.extend.helper.register('__favicon_tag', function (path) {
|
||||||
const _favicon_tag = hexo.extend.helper.get('favicon_tag').bind(hexo);
|
const _favicon_tag = hexo.extend.helper.get('favicon_tag').bind(hexo);
|
||||||
if (this.theme.cdn.enable) {
|
if (this.theme.cdn.enable) {
|
||||||
return `<link rel="shortcut icon" href="//cdn.jsdelivr.net/npm/hexo-theme-keep@${this.theme.version}/source/${path}">`
|
return `<link rel="icon" href="//cdn.jsdelivr.net/npm/hexo-theme-keep@${this.theme.version}/source/${path}">`
|
||||||
} else {
|
} else {
|
||||||
return _favicon_tag(path);
|
return _favicon_tag(path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue