mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 14:22:01 +08:00
breaking changes: cdn 可一鍵設置 本地文件/可單獨配置主題文件,第三方文件的 cdn
breaking changes: 移除 utterances,giscus, addtoany, busuanzi 的 cdn 配置
This commit is contained in:
1 parent
c1ac4a5e16
commit
ab6672429f
30 files changed
+335
-234
No files matched your search
+58
-85
@@ -827,88 +827,61 @@ inject:
|
||||
# Don't modify the following settings unless you know how they work
|
||||
# 非必要請不要修改
|
||||
CDN:
|
||||
# main
|
||||
main_css:
|
||||
main:
|
||||
utils:
|
||||
|
||||
# pjax
|
||||
pjax:
|
||||
|
||||
# comments
|
||||
gitalk:
|
||||
gitalk_css:
|
||||
blueimp_md5:
|
||||
valine:
|
||||
disqusjs:
|
||||
disqusjs_css:
|
||||
utterances:
|
||||
twikoo:
|
||||
waline:
|
||||
giscus:
|
||||
|
||||
# share
|
||||
addtoany:
|
||||
sharejs:
|
||||
sharejs_css:
|
||||
|
||||
# search
|
||||
local_search:
|
||||
algolia_js:
|
||||
algolia_search_v4:
|
||||
instantsearch_v4:
|
||||
|
||||
# math
|
||||
mathjax:
|
||||
katex:
|
||||
katex_copytex:
|
||||
katex_copytex_css:
|
||||
mermaid:
|
||||
|
||||
# count
|
||||
busuanzi:
|
||||
|
||||
# background effect
|
||||
canvas_ribbon:
|
||||
canvas_fluttering_ribbon:
|
||||
canvas_nest:
|
||||
|
||||
lazyload:
|
||||
instantpage:
|
||||
typed:
|
||||
pangu:
|
||||
|
||||
# photo
|
||||
fancybox_css_v4:
|
||||
fancybox_v4:
|
||||
medium_zoom:
|
||||
|
||||
# snackbar
|
||||
snackbar_css:
|
||||
snackbar:
|
||||
|
||||
# effect
|
||||
activate_power_mode:
|
||||
fireworks:
|
||||
click_heart:
|
||||
ClickShowText:
|
||||
|
||||
# fontawesome
|
||||
fontawesomeV6:
|
||||
|
||||
# Conversion between Traditional and Simplified Chinese
|
||||
translate:
|
||||
|
||||
# flickr-justified-gallery
|
||||
flickr_justified_gallery_js:
|
||||
flickr_justified_gallery_css:
|
||||
|
||||
# aplayer
|
||||
aplayer_css:
|
||||
aplayer_js:
|
||||
meting_js:
|
||||
|
||||
# Prism.js
|
||||
prismjs_js:
|
||||
prismjs_lineNumber_js:
|
||||
prismjs_autoloader:
|
||||
# The CDN provider of internal scripts (主題內部 js 的 cdn 配置)
|
||||
# option: local/jsdelivr
|
||||
# Dev version cannot choose jsdelivr (dev版的主題不能設置為 jsdelivr)
|
||||
internal_provider: local
|
||||
# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
|
||||
# option: local/jsdelivr
|
||||
# when set it to local, you need to install hexo-butterfly-extjs
|
||||
third_party_provider: jsdelivr
|
||||
option:
|
||||
# main_css:
|
||||
# main:
|
||||
# utils:
|
||||
# translate:
|
||||
# local_search:
|
||||
# algolia_js:
|
||||
# algolia_search_v4:
|
||||
# instantsearch_v4:
|
||||
# pjax:
|
||||
# gitalk:
|
||||
# gitalk_css:
|
||||
# blueimp_md5:
|
||||
# valine:
|
||||
# disqusjs:
|
||||
# disqusjs_css:
|
||||
# twikoo:
|
||||
# waline:
|
||||
# sharejs:
|
||||
# sharejs_css:
|
||||
# mathjax:
|
||||
# katex:
|
||||
# katex_copytex:
|
||||
# katex_copytex_css:
|
||||
# mermaid:
|
||||
# canvas_ribbon:
|
||||
# canvas_fluttering_ribbon:
|
||||
# canvas_nest:
|
||||
# lazyload:
|
||||
# instantpage:
|
||||
# typed:
|
||||
# pangu:
|
||||
# fancybox_css_v4:
|
||||
# fancybox_v4:
|
||||
# medium_zoom:
|
||||
# snackbar_css:
|
||||
# snackbar:
|
||||
# activate_power_mode:
|
||||
# fireworks:
|
||||
# click_heart:
|
||||
# ClickShowText:
|
||||
# fontawesomeV6:
|
||||
# flickr_justified_gallery_js:
|
||||
# flickr_justified_gallery_css:
|
||||
# aplayer_css:
|
||||
# aplayer_js:
|
||||
# meting_js:
|
||||
# prismjs_js:
|
||||
# prismjs_lineNumber_js:
|
||||
# prismjs_autoloader:
|
||||
@@ -1,34 +1,34 @@
|
||||
div
|
||||
script(src=url_for(theme.CDN.utils))
|
||||
script(src=url_for(theme.CDN.main))
|
||||
script(src=url_for(theme.asset.utils))
|
||||
script(src=url_for(theme.asset.main))
|
||||
|
||||
if theme.translate.enable
|
||||
script(src=url_for(theme.CDN.translate))
|
||||
script(src=url_for(theme.asset.translate))
|
||||
|
||||
if theme.medium_zoom
|
||||
script(src=url_for(theme.CDN.medium_zoom))
|
||||
script(src=url_for(theme.asset.medium_zoom))
|
||||
else if theme.fancybox
|
||||
script(src=url_for(theme.CDN.fancybox_v4))
|
||||
script(src=url_for(theme.asset.fancybox_v4))
|
||||
|
||||
if theme.instantpage
|
||||
script(src=url_for(theme.CDN.instantpage), type='module')
|
||||
script(src=url_for(theme.asset.instantpage), type='module')
|
||||
|
||||
if theme.lazyload.enable
|
||||
script(src=url_for(theme.CDN.lazyload))
|
||||
script(src=url_for(theme.asset.lazyload))
|
||||
|
||||
if theme.snackbar.enable
|
||||
script(src=url_for(theme.CDN.snackbar))
|
||||
script(src=url_for(theme.asset.snackbar))
|
||||
|
||||
if theme.pangu.enable
|
||||
!= partial("includes/third-party/pangu.pug", {}, { cache: true })
|
||||
|
||||
//- search
|
||||
if theme.algolia_search.enable
|
||||
script(src=url_for(theme.CDN.algolia_search_v4))
|
||||
script(src=url_for(theme.CDN.instantsearch_v4))
|
||||
script(src=url_for(theme.CDN.algolia_js))
|
||||
script(src=url_for(theme.asset.algolia_search_v4))
|
||||
script(src=url_for(theme.asset.instantsearch_v4))
|
||||
script(src=url_for(theme.asset.algolia_js))
|
||||
else if theme.local_search.enable
|
||||
script(src=url_for(theme.CDN.local_search))
|
||||
script(src=url_for(theme.asset.local_search))
|
||||
|
||||
if theme.preloader
|
||||
!= partial("includes/loading/loading-js", {}, { cache: true })
|
||||
@@ -69,4 +69,4 @@ div
|
||||
!= partial("includes/third-party/pjax", {}, { cache: true })
|
||||
|
||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
||||
script(async data-pjax src=url_for(theme.CDN.busuanzi))
|
||||
script(async data-pjax src='//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js')
|
||||
@@ -46,14 +46,14 @@ if (theme.pwa && theme.pwa.enable)
|
||||
!=partial('includes/head/pwa', {}, {cache: true})
|
||||
|
||||
//- main css
|
||||
link(rel='stylesheet', href=url_for(theme.CDN.main_css))
|
||||
link(rel='stylesheet', href=url_for(theme.CDN.fontawesomeV6) media="print" onload="this.media='all'")
|
||||
link(rel='stylesheet', href=url_for(theme.asset.main_css))
|
||||
link(rel='stylesheet', href=url_for(theme.asset.fontawesomeV6) media="print" onload="this.media='all'")
|
||||
|
||||
if (theme.snackbar && theme.snackbar.enable)
|
||||
link(rel='stylesheet', href=url_for(theme.CDN.snackbar_css) media="print" onload="this.media='all'")
|
||||
link(rel='stylesheet', href=url_for(theme.asset.snackbar_css) media="print" onload="this.media='all'")
|
||||
|
||||
if theme.fancybox
|
||||
link(rel='stylesheet' href=url_for(theme.CDN.fancybox_css_v4) media="print" onload="this.media='all'")
|
||||
link(rel='stylesheet' href=url_for(theme.asset.fancybox_css_v4) media="print" onload="this.media='all'")
|
||||
|
||||
//- google_adsense
|
||||
!=partial('includes/head/google_adsense', {}, {cache: true})
|
||||
|
||||
Loaded 3 of 30 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user