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
|
# Don't modify the following settings unless you know how they work
|
||||||
# 非必要請不要修改
|
# 非必要請不要修改
|
||||||
CDN:
|
CDN:
|
||||||
# main
|
# The CDN provider of internal scripts (主題內部 js 的 cdn 配置)
|
||||||
main_css:
|
# option: local/jsdelivr
|
||||||
main:
|
# Dev version cannot choose jsdelivr (dev版的主題不能設置為 jsdelivr)
|
||||||
utils:
|
internal_provider: local
|
||||||
|
# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
|
||||||
# pjax
|
# option: local/jsdelivr
|
||||||
pjax:
|
# when set it to local, you need to install hexo-butterfly-extjs
|
||||||
|
third_party_provider: jsdelivr
|
||||||
# comments
|
option:
|
||||||
gitalk:
|
# main_css:
|
||||||
gitalk_css:
|
# main:
|
||||||
blueimp_md5:
|
# utils:
|
||||||
valine:
|
# translate:
|
||||||
disqusjs:
|
# local_search:
|
||||||
disqusjs_css:
|
# algolia_js:
|
||||||
utterances:
|
# algolia_search_v4:
|
||||||
twikoo:
|
# instantsearch_v4:
|
||||||
waline:
|
# pjax:
|
||||||
giscus:
|
# gitalk:
|
||||||
|
# gitalk_css:
|
||||||
# share
|
# blueimp_md5:
|
||||||
addtoany:
|
# valine:
|
||||||
sharejs:
|
# disqusjs:
|
||||||
sharejs_css:
|
# disqusjs_css:
|
||||||
|
# twikoo:
|
||||||
# search
|
# waline:
|
||||||
local_search:
|
# sharejs:
|
||||||
algolia_js:
|
# sharejs_css:
|
||||||
algolia_search_v4:
|
# mathjax:
|
||||||
instantsearch_v4:
|
# katex:
|
||||||
|
# katex_copytex:
|
||||||
# math
|
# katex_copytex_css:
|
||||||
mathjax:
|
# mermaid:
|
||||||
katex:
|
# canvas_ribbon:
|
||||||
katex_copytex:
|
# canvas_fluttering_ribbon:
|
||||||
katex_copytex_css:
|
# canvas_nest:
|
||||||
mermaid:
|
# lazyload:
|
||||||
|
# instantpage:
|
||||||
# count
|
# typed:
|
||||||
busuanzi:
|
# pangu:
|
||||||
|
# fancybox_css_v4:
|
||||||
# background effect
|
# fancybox_v4:
|
||||||
canvas_ribbon:
|
# medium_zoom:
|
||||||
canvas_fluttering_ribbon:
|
# snackbar_css:
|
||||||
canvas_nest:
|
# snackbar:
|
||||||
|
# activate_power_mode:
|
||||||
lazyload:
|
# fireworks:
|
||||||
instantpage:
|
# click_heart:
|
||||||
typed:
|
# ClickShowText:
|
||||||
pangu:
|
# fontawesomeV6:
|
||||||
|
# flickr_justified_gallery_js:
|
||||||
# photo
|
# flickr_justified_gallery_css:
|
||||||
fancybox_css_v4:
|
# aplayer_css:
|
||||||
fancybox_v4:
|
# aplayer_js:
|
||||||
medium_zoom:
|
# meting_js:
|
||||||
|
# prismjs_js:
|
||||||
# snackbar
|
# prismjs_lineNumber_js:
|
||||||
snackbar_css:
|
# prismjs_autoloader:
|
||||||
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:
|
|
||||||
@@ -1,34 +1,34 @@
|
|||||||
div
|
div
|
||||||
script(src=url_for(theme.CDN.utils))
|
script(src=url_for(theme.asset.utils))
|
||||||
script(src=url_for(theme.CDN.main))
|
script(src=url_for(theme.asset.main))
|
||||||
|
|
||||||
if theme.translate.enable
|
if theme.translate.enable
|
||||||
script(src=url_for(theme.CDN.translate))
|
script(src=url_for(theme.asset.translate))
|
||||||
|
|
||||||
if theme.medium_zoom
|
if theme.medium_zoom
|
||||||
script(src=url_for(theme.CDN.medium_zoom))
|
script(src=url_for(theme.asset.medium_zoom))
|
||||||
else if theme.fancybox
|
else if theme.fancybox
|
||||||
script(src=url_for(theme.CDN.fancybox_v4))
|
script(src=url_for(theme.asset.fancybox_v4))
|
||||||
|
|
||||||
if theme.instantpage
|
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
|
if theme.lazyload.enable
|
||||||
script(src=url_for(theme.CDN.lazyload))
|
script(src=url_for(theme.asset.lazyload))
|
||||||
|
|
||||||
if theme.snackbar.enable
|
if theme.snackbar.enable
|
||||||
script(src=url_for(theme.CDN.snackbar))
|
script(src=url_for(theme.asset.snackbar))
|
||||||
|
|
||||||
if theme.pangu.enable
|
if theme.pangu.enable
|
||||||
!= partial("includes/third-party/pangu.pug", {}, { cache: true })
|
!= partial("includes/third-party/pangu.pug", {}, { cache: true })
|
||||||
|
|
||||||
//- search
|
//- search
|
||||||
if theme.algolia_search.enable
|
if theme.algolia_search.enable
|
||||||
script(src=url_for(theme.CDN.algolia_search_v4))
|
script(src=url_for(theme.asset.algolia_search_v4))
|
||||||
script(src=url_for(theme.CDN.instantsearch_v4))
|
script(src=url_for(theme.asset.instantsearch_v4))
|
||||||
script(src=url_for(theme.CDN.algolia_js))
|
script(src=url_for(theme.asset.algolia_js))
|
||||||
else if theme.local_search.enable
|
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
|
if theme.preloader
|
||||||
!= partial("includes/loading/loading-js", {}, { cache: true })
|
!= partial("includes/loading/loading-js", {}, { cache: true })
|
||||||
@@ -69,4 +69,4 @@ div
|
|||||||
!= partial("includes/third-party/pjax", {}, { cache: true })
|
!= partial("includes/third-party/pjax", {}, { cache: true })
|
||||||
|
|
||||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
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})
|
!=partial('includes/head/pwa', {}, {cache: true})
|
||||||
|
|
||||||
//- main css
|
//- main css
|
||||||
link(rel='stylesheet', href=url_for(theme.CDN.main_css))
|
link(rel='stylesheet', href=url_for(theme.asset.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.fontawesomeV6) media="print" onload="this.media='all'")
|
||||||
|
|
||||||
if (theme.snackbar && theme.snackbar.enable)
|
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
|
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
|
//- google_adsense
|
||||||
!=partial('includes/head/google_adsense', {}, {cache: true})
|
!=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