修改 jsdelivr 的节点为 fastly (#81)
This commit is contained in:
parent
109c24c6d0
commit
e56354c152
46
_config.yml
46
_config.yml
|
@ -110,7 +110,7 @@ comments:
|
||||||
theme: preferred-color-scheme
|
theme: preferred-color-scheme
|
||||||
label:
|
label:
|
||||||
valine:
|
valine:
|
||||||
js: https://cdn.jsdelivr.net/gh/XuxuGood/simple-blog-cdn@main/js/Valine.min.js
|
js: https://fastly.jsdelivr.net/gh/XuxuGood/simple-blog-cdn@main/js/Valine.min.js
|
||||||
appId: # your appId
|
appId: # your appId
|
||||||
appKey: # your appKey
|
appKey: # your appKey
|
||||||
placeholder:
|
placeholder:
|
||||||
|
@ -134,7 +134,7 @@ comments:
|
||||||
# Twikoo
|
# Twikoo
|
||||||
# https://twikoo.js.org/
|
# https://twikoo.js.org/
|
||||||
twikoo:
|
twikoo:
|
||||||
js: https://cdn.jsdelivr.net/npm/twikoo@1.4.0/dist/twikoo.all.min.js # 建议锁定版本
|
js: https://fastly.jsdelivr.net/npm/twikoo@1.4.0/dist/twikoo.all.min.js # 建议锁定版本
|
||||||
envId: https://xxx # vercel函数
|
envId: https://xxx # vercel函数
|
||||||
waline:
|
waline:
|
||||||
js: https://unpkg.com/@waline/client@v2/dist/waline.js
|
js: https://unpkg.com/@waline/client@v2/dist/waline.js
|
||||||
|
@ -187,16 +187,16 @@ comments:
|
||||||
footer:
|
footer:
|
||||||
social:
|
social:
|
||||||
# github:
|
# github:
|
||||||
# icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/08a41b181ce68.svg"/>'
|
# icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/08a41b181ce68.svg"/>'
|
||||||
# url: /
|
# url: /
|
||||||
# music:
|
# music:
|
||||||
# icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3845874.svg"/>'
|
# icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3845874.svg"/>'
|
||||||
# url: /
|
# url: /
|
||||||
# unsplash:
|
# unsplash:
|
||||||
# icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3616429.svg"/>'
|
# icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3616429.svg"/>'
|
||||||
# url: /
|
# url: /
|
||||||
# comments:
|
# comments:
|
||||||
# icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/942ebbf1a4b91.svg"/>'
|
# icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/942ebbf1a4b91.svg"/>'
|
||||||
# url: /about/#comments
|
# url: /about/#comments
|
||||||
sitemap:
|
sitemap:
|
||||||
# '博客':
|
# '博客':
|
||||||
|
@ -234,11 +234,11 @@ tag_plugins:
|
||||||
prefix: https://s2.loli.net/2022/01/04/UvHcsa73jQPnobq.png
|
prefix: https://s2.loli.net/2022/01/04/UvHcsa73jQPnobq.png
|
||||||
# {% emoji %}
|
# {% emoji %}
|
||||||
emoji:
|
emoji:
|
||||||
default: https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/qq/%s.gif
|
default: https://fastly.jsdelivr.net/gh/volantis-x/cdn-emoji/qq/%s.gif
|
||||||
twemoji: https://cdn.jsdelivr.net/gh/twitter/twemoji/assets/svg/%s.svg
|
twemoji: https://fastly.jsdelivr.net/gh/twitter/twemoji/assets/svg/%s.svg
|
||||||
qq: https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/qq/%s.gif
|
qq: https://fastly.jsdelivr.net/gh/volantis-x/cdn-emoji/qq/%s.gif
|
||||||
aru: https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/aru-l/%s.gif
|
aru: https://fastly.jsdelivr.net/gh/volantis-x/cdn-emoji/aru-l/%s.gif
|
||||||
tieba: https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/tieba/%s.png
|
tieba: https://fastly.jsdelivr.net/gh/volantis-x/cdn-emoji/tieba/%s.png
|
||||||
# {% image %}
|
# {% image %}
|
||||||
image:
|
image:
|
||||||
fancybox: # true, false
|
fancybox: # true, false
|
||||||
|
@ -248,7 +248,7 @@ tag_plugins:
|
||||||
plugins:
|
plugins:
|
||||||
## required plugins ##
|
## required plugins ##
|
||||||
# jquery
|
# jquery
|
||||||
jquery: https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
|
jquery: https://fastly.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
|
||||||
|
|
||||||
# issues api
|
# issues api
|
||||||
sitesjs: /js/plugins/sites.js
|
sitesjs: /js/plugins/sites.js
|
||||||
|
@ -259,20 +259,20 @@ plugins:
|
||||||
preload:
|
preload:
|
||||||
enable: true
|
enable: true
|
||||||
service: flying_pages # instant_page, flying_pages
|
service: flying_pages # instant_page, flying_pages
|
||||||
instant_page: https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js
|
instant_page: https://fastly.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js
|
||||||
flying_pages: https://cdn.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js
|
flying_pages: https://fastly.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js
|
||||||
|
|
||||||
# image lazyload
|
# image lazyload
|
||||||
# https://www.npmjs.com/package/vanilla-lazyload
|
# https://www.npmjs.com/package/vanilla-lazyload
|
||||||
lazyload:
|
lazyload:
|
||||||
enable: true # [hexo clean && hexo s] is required after changing this value.
|
enable: true # [hexo clean && hexo s] is required after changing this value.
|
||||||
js: https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.3.1/dist/lazyload.min.js
|
js: https://fastly.jsdelivr.net/npm/vanilla-lazyload@17.3.1/dist/lazyload.min.js
|
||||||
transition: blur # blur, fade
|
transition: blur # blur, fade
|
||||||
|
|
||||||
# https://scrollrevealjs.org/api/reveal.html
|
# https://scrollrevealjs.org/api/reveal.html
|
||||||
scrollreveal:
|
scrollreveal:
|
||||||
enable: #true
|
enable: #true
|
||||||
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
|
js: https://fastly.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
|
||||||
distance: 8px
|
distance: 8px
|
||||||
duration: 500 # ms
|
duration: 500 # ms
|
||||||
interval: 100 # ms
|
interval: 100 # ms
|
||||||
|
@ -282,8 +282,8 @@ plugins:
|
||||||
# available for {% image xxx %}
|
# available for {% image xxx %}
|
||||||
fancybox:
|
fancybox:
|
||||||
enable: true
|
enable: true
|
||||||
js: https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js
|
js: https://fastly.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js
|
||||||
css: https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css
|
css: https://fastly.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css
|
||||||
# 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
|
# 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
|
||||||
# 使用valine评论可以写: .vcontent img:not(.vemoji)
|
# 使用valine评论可以写: .vcontent img:not(.vemoji)
|
||||||
# 使用twikoo评论可以写: .tk-content img:not([class*="emo"])
|
# 使用twikoo评论可以写: .tk-content img:not([class*="emo"])
|
||||||
|
@ -312,12 +312,12 @@ style:
|
||||||
dark: '#313438'
|
dark: '#313438'
|
||||||
animated_avatar:
|
animated_avatar:
|
||||||
animate: auto # auto, always
|
animate: auto # auto, always
|
||||||
background: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.2/avatar/round/rainbow64@3x.webp
|
background: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.2/avatar/round/rainbow64@3x.webp
|
||||||
codeblock:
|
codeblock:
|
||||||
scrollbar: 4px
|
scrollbar: 4px
|
||||||
|
|
||||||
default:
|
default:
|
||||||
avatar: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg
|
avatar: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg
|
||||||
link: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg
|
link: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg
|
||||||
cover: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg
|
cover: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg
|
||||||
image: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg
|
image: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg
|
||||||
|
|
|
@ -6,7 +6,7 @@ page.header = false;
|
||||||
page.robots = 'none';
|
page.robots = 'none';
|
||||||
%>
|
%>
|
||||||
<article class='md error-page'>
|
<article class='md error-page'>
|
||||||
<h1><img id='error' src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1>
|
<h1><img id='error' src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1>
|
||||||
<p class='what'>
|
<p class='what'>
|
||||||
<strong>
|
<strong>
|
||||||
<%- __('page.error.what') %>
|
<%- __('page.error.what') %>
|
||||||
|
|
|
@ -49,8 +49,8 @@ function og_args() {
|
||||||
<%- generate_robots() %>
|
<%- generate_robots() %>
|
||||||
|
|
||||||
<meta http-equiv='x-dns-prefetch-control' content='on' />
|
<meta http-equiv='x-dns-prefetch-control' content='on' />
|
||||||
<link rel='dns-prefetch' href='https://cdn.jsdelivr.net'>
|
<link rel='dns-prefetch' href='https://fastly.jsdelivr.net'>
|
||||||
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
|
<link rel="preconnect" href="https://fastly.jsdelivr.net" crossorigin>
|
||||||
<link rel='dns-prefetch' href='//unpkg.com'>
|
<link rel='dns-prefetch' href='//unpkg.com'>
|
||||||
|
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
|
|
|
@ -85,13 +85,13 @@ function layoutDiv() {
|
||||||
}
|
}
|
||||||
el += '>';
|
el += '>';
|
||||||
if (item == 'wechat') {
|
if (item == 'wechat') {
|
||||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/b32ef3da1162a.svg"/>';
|
el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/b32ef3da1162a.svg"/>';
|
||||||
} else if (item == 'weibo') {
|
} else if (item == 'weibo') {
|
||||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/80c07e4dbb303.svg"/>';
|
el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/80c07e4dbb303.svg"/>';
|
||||||
} else if (item == 'email') {
|
} else if (item == 'email') {
|
||||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/a1b00e20f425d.svg"/>';
|
el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/a1b00e20f425d.svg"/>';
|
||||||
} else if (item == 'link') {
|
} else if (item == 'link') {
|
||||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/8411ed322ced6.svg"/>';
|
el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/8411ed322ced6.svg"/>';
|
||||||
}
|
}
|
||||||
el += '</a>';
|
el += '</a>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<% if (is_home() && page.total > 1) { %>
|
<% if (is_home() && page.total > 1) { %>
|
||||||
<div class='paginator-wrap dis-select'>
|
<div class='paginator-wrap dis-select'>
|
||||||
<a class='paginator prev<%- page.prev != 0 ? "" : " disable" %>' href='<%- url_for(page.prev_link) %>'>
|
<a class='paginator prev<%- page.prev != 0 ? "" : " disable" %>' href='<%- url_for(page.prev_link) %>'>
|
||||||
<img src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/f049bbd4e88ec.svg'/>
|
<img src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/f049bbd4e88ec.svg'/>
|
||||||
</a>
|
</a>
|
||||||
<div class='paginator current'>
|
<div class='paginator current'>
|
||||||
<%- page.current %><span class='sep'></span><%- page.total %>
|
<%- page.current %><span class='sep'></span><%- page.total %>
|
||||||
</div>
|
</div>
|
||||||
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
||||||
<img src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/064b95430caf4.svg'/>
|
<img src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/064b95430caf4.svg'/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -80,7 +80,7 @@ function div_default() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (post.pin) {
|
if (post.pin) {
|
||||||
el += '<span class="pin"><img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/badge/3279dd441df8b.svg"/></span>';
|
el += '<span class="pin"><img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/badge/3279dd441df8b.svg"/></span>';
|
||||||
}
|
}
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
el += '</article>';
|
el += '</article>';
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
el: '#valine_container',
|
el: '#valine_container',
|
||||||
path: path,
|
path: path,
|
||||||
placeholder: placeholder,
|
placeholder: placeholder,
|
||||||
emojiCDN: 'https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/valine/',
|
emojiCDN: 'https://fastly.jsdelivr.net/gh/volantis-x/cdn-emoji/valine/',
|
||||||
emojiMaps: getEmojiMaps(),
|
emojiMaps: getEmojiMaps(),
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
// required plugins (only load if needs)
|
// required plugins (only load if needs)
|
||||||
stellar.plugins = {
|
stellar.plugins = {
|
||||||
jQuery: '<%- url_for(theme.plugins.jquery || "https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js") %>',
|
jQuery: '<%- url_for(theme.plugins.jquery || "https://fastly.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js") %>',
|
||||||
sitesjs: '<%- url_for(theme.plugins.sitesjs) %>',
|
sitesjs: '<%- url_for(theme.plugins.sitesjs) %>',
|
||||||
friendsjs: '<%- url_for(theme.plugins.friendsjs) %>',
|
friendsjs: '<%- url_for(theme.plugins.friendsjs) %>',
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@ function prepare() {
|
||||||
sub=${VERSION#*.}
|
sub=${VERSION#*.}
|
||||||
sub=${sub%%.*}
|
sub=${sub%%.*}
|
||||||
jsdelivr=$main'.'$sub
|
jsdelivr=$main'.'$sub
|
||||||
sed -i "" "s/\(cdn.jsdelivr.net\/npm\/hexo-theme-stellar@[^/]\{1,\}\)/cdn.jsdelivr.net\/npm\/hexo-theme-stellar@${jsdelivr}/g" '_config.yml'
|
sed -i "" "s/\(fastly.jsdelivr.net\/npm\/hexo-theme-stellar@[^/]\{1,\}\)/fastly.jsdelivr.net\/npm\/hexo-theme-stellar@${jsdelivr}/g" '_config.yml'
|
||||||
}
|
}
|
||||||
|
|
||||||
# 提交
|
# 提交
|
||||||
|
|
|
@ -32,7 +32,7 @@ $dark-site-bg-mobile = black
|
||||||
|
|
||||||
// @font-face
|
// @font-face
|
||||||
// font-family: 'Dosis'
|
// font-family: 'Dosis'
|
||||||
// src: url('https://cdn.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
|
// src: url('https://fastly.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
|
||||||
// font-weight: normal
|
// font-weight: normal
|
||||||
// font-style: normal
|
// font-style: normal
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
margin-top: 19px
|
margin-top: 19px
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
.frame
|
.frame
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/frame/iphone11.svg);
|
background-image: url(https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/frame/iphone11.svg);
|
||||||
width: 329px
|
width: 329px
|
||||||
height: 658px
|
height: 658px
|
||||||
&[focus='top']
|
&[focus='top']
|
||||||
|
|
|
@ -77,7 +77,7 @@ $(function () {
|
||||||
cfg.el = el;
|
cfg.el = el;
|
||||||
cfg.api = api;
|
cfg.api = api;
|
||||||
cfg.class = el.getAttribute('class');
|
cfg.class = el.getAttribute('class');
|
||||||
cfg.avatar = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
|
cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
|
||||||
friendsjs.layout(cfg);
|
friendsjs.layout(cfg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -80,8 +80,8 @@ $(function () {
|
||||||
cfg.class = el.getAttribute('class');
|
cfg.class = el.getAttribute('class');
|
||||||
cfg.el = el;
|
cfg.el = el;
|
||||||
cfg.api = api;
|
cfg.api = api;
|
||||||
cfg.avatar = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg';
|
cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg';
|
||||||
cfg.screenshot = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg';
|
cfg.screenshot = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg';
|
||||||
sitesjs.layout(cfg);
|
sitesjs.layout(cfg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue