feat: CDN 可配置為 unpkg

fix: 評論系統開啟時 busuanzi 的 page_pv 不顯示
This commit is contained in:
Jerry Wong committed 2022-05-22 16:20:49 +08:00
1 parent 9a86429484
commit b4d3ea86bb
4 files changed
+78 -75

No files matched your search

+3 -3
View File
@@ -836,11 +836,11 @@ inject:
# 非必要請不要修改
CDN:
# The CDN provider of internal scripts (主題內部 js 的 cdn 配置)
# option: local/jsdelivr
# Dev version cannot choose jsdelivr (dev版的主題不能設置為 jsdelivr)
# option: local/jsdelivr/unpkg
# Dev version cannot choose jsdelivr/unpkg (dev版的主題不能設置為 jsdelivr/unpkg)
internal_provider: local
# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
# option: local/jsdelivr
# option: local/jsdelivr/unpkg
# when set it to local, you need to install hexo-butterfly-extjs
third_party_provider: jsdelivr
option:
+12 -17
View File
@@ -63,23 +63,18 @@
- const commentUse = comments.use
if commentUse && !comments.lazyload
case commentUse[0]
when 'Valine'
if theme.valine.visitor
+pvBlock(url_for(page.path),'leancloud_visitors',page.title)
span.leancloud-visitors-count
when 'Waline'
if theme.waline.pageview
+pvBlock('','','')
span.waline-pageview-count(data-path=url_for(page.path))
when 'Twikoo'
if theme.twikoo.visitor
+pvBlock('','','')
span#twikoo_visitors
default
if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv
if commentUse[0] === 'Valine' && theme.valine.visitor
+pvBlock(url_for(page.path),'leancloud_visitors',page.title)
span.leancloud-visitors-count
else if commentUse[0] === 'Waline' && theme.waline.pageview
+pvBlock('','','')
span.waline-pageview-count(data-path=url_for(page.path))
else if commentUse[0] === 'Twikoo' && theme.twikoo.visitor
+pvBlock('','','')
span#twikoo_visitors
else if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv
else if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
"version": "4.3.0-b1",
"version": "4.3.0-b2",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more