Skip to content

Commit

Permalink
[opt] cdn & highlightjs
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoxuu committed Jan 21, 2024
1 parent c640310 commit afb0e5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 6 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ tag_plugins:
plugins:
## required plugins ##
# 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:
Expand All @@ -371,15 +371,14 @@ plugins:
# preload
preload:
enable: true
service: flying_pages # instant_page, flying_pages
instant_page: https://gcore.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js
flying_pages: https://gcore.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js
service: flying_pages # flying_pages
flying_pages: https://cdn.bootcdn.net/ajax/libs/flying-pages/2.1.2/flying-pages.min.js

# image lazyload
# https://www.npmjs.com/package/vanilla-lazyload
lazyload:
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

# https://scrollrevealjs.org/api/reveal.html
Expand Down Expand Up @@ -505,7 +504,7 @@ style:
background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
codeblock:
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: 正在加载
error: 加载失败,请稍后重试。
Expand All @@ -516,8 +515,8 @@ style:
# 可以设置:纯色/渐变色/图片作为背景
# background: 'linear-gradient(to bottom, #abc3, #abc3)'
# 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)'
# 在图片上层增加高斯模糊效果(同时附带饱和度增强效果)
blur: true
paginator:
prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg
Expand Down
8 changes: 1 addition & 7 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,7 @@ if (stellar.plugins.swiper) {

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

0 comments on commit afb0e5f

Please sign in to comment.