[opt] cdn & highlightjs

This commit is contained in:
xaoxuu 2024-01-21 21:46:46 +08:00
parent c640310b06
commit afb0e5f734
2 changed files with 7 additions and 14 deletions

View File

@ -351,7 +351,7 @@ tag_plugins:
plugins: plugins:
## required plugins ## ## required plugins ##
# jquery # jquery
jquery: https://gcore.jsdelivr.net/npm/jquery@3.6.2/dist/jquery.min.js jquery: https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js
# stellar api # stellar api
stellar: stellar:
@ -371,15 +371,14 @@ plugins:
# preload # preload
preload: preload:
enable: true enable: true
service: flying_pages # instant_page, flying_pages service: flying_pages # flying_pages
instant_page: https://gcore.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js flying_pages: https://cdn.bootcdn.net/ajax/libs/flying-pages/2.1.2/flying-pages.min.js
flying_pages: https://gcore.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://gcore.jsdelivr.net/npm/vanilla-lazyload@17.8.3/dist/lazyload.min.js js: https://cdn.bootcdn.net/ajax/libs/vanilla-lazyload/17.8.4/lazyload.min.js
transition: fade # blur, fade transition: fade # blur, fade
# https://scrollrevealjs.org/api/reveal.html # https://scrollrevealjs.org/api/reveal.html
@ -505,7 +504,7 @@ style:
background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
codeblock: codeblock:
scrollbar: 4px scrollbar: 4px
highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/atom-one-dark.min.css highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/atom-one-dark.min.css
loading: loading:
loading: 正在加载 loading: 正在加载
error: 加载失败,请稍后重试。 error: 加载失败,请稍后重试。
@ -516,8 +515,8 @@ style:
# 可以设置:纯色/渐变色/图片作为背景 # 可以设置:纯色/渐变色/图片作为背景
# background: 'linear-gradient(to bottom, #abc3, #abc3)' # background: 'linear-gradient(to bottom, #abc3, #abc3)'
# background: 'linear-gradient(to bottom, #20E2D744, #F9FEA544)' # background: 'linear-gradient(to bottom, #20E2D744, #F9FEA544)'
# 在图片上层增加高斯模糊效果(同时附带饱和度增强效果)
background: 'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)' background: 'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)'
# 在图片上层增加高斯模糊效果(同时附带饱和度增强效果)
blur: true blur: true
paginator: paginator:
prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg

View File

@ -286,13 +286,7 @@ if (stellar.plugins.swiper) {
// preload // preload
if (stellar.plugins.preload) { if (stellar.plugins.preload) {
if (stellar.plugins.preload.service == 'instant_page') { if (stellar.plugins.preload.service == 'flying_pages') {
stellar.loadScript(stellar.plugins.preload.instant_page, {
defer: true,
type: 'module',
integrity: 'sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1'
})
} else if (stellar.plugins.preload.service == 'flying_pages') {
window.FPConfig = { window.FPConfig = {
delay: 0, delay: 0,
ignoreKeywords: [], ignoreKeywords: [],