From 6e58f68f0cf0612ebfa1ec898d5fd077888ed702 Mon Sep 17 00:00:00 2001 From: Jerry Wong Date: Thu, 19 May 2022 16:37:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=BE=A9=E9=A6=96=E9=A0=81?= =?UTF-8?q?=E6=96=87=E7=AB=A0=20valine=20=E8=A9=95=E8=AB=96=E6=95=B8?= =?UTF-8?q?=E5=8F=AA=E9=A1=AF=E7=A4=BA=E7=AC=AC=E4=B8=80=E7=AF=87=E7=9A=84?= =?UTF-8?q?=20bug=20fix:=20=E4=BF=AE=E5=BE=A9=E5=AD=90=E7=9B=AE=E9=8C=84?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E7=AC=AC=E4=B8=89=E6=96=B9=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=B3=87=E6=BA=90=E7=84=A1=E6=B3=95=E5=8A=A0?= =?UTF-8?q?=E8=BC=89=E7=9A=84=20bug=20closed=20#908=20fix:=20=E8=A9=95?= =?UTF-8?q?=E8=AB=96=E7=B3=BB=E7=B5=B1=E9=96=8B=E5=95=9F=E6=99=82=20busuan?= =?UTF-8?q?zi=20=E7=9A=84=20page=5Fpv=20=E4=B8=8D=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=20bug=20closed=20#902=20fix:=20=E4=BF=AE=E5=BE=A9=20p?= =?UTF-8?q?jax=20=E4=B8=8B=EF=BC=8C=E4=BD=BF=E7=94=A8=20mermaid=20?= =?UTF-8?q?=E8=B7=B3=E8=BD=89=E6=9C=83=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BC=89?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/header/post-info.pug | 4 ++++ layout/includes/third-party/card-post-count/twikoo.pug | 2 +- layout/includes/third-party/card-post-count/valine.pug | 2 +- layout/includes/third-party/comments/twikoo.pug | 2 +- layout/includes/third-party/math/katex.pug | 4 ++-- layout/includes/third-party/math/mathjax.pug | 2 +- layout/includes/third-party/math/mermaid.pug | 2 +- .../includes/third-party/newest-comments/twikoo-comment.pug | 2 +- layout/includes/third-party/pjax.pug | 2 +- package.json | 2 +- 10 files changed, 14 insertions(+), 10 deletions(-) diff --git a/layout/includes/header/post-info.pug b/layout/includes/header/post-info.pug index 32936970e..259b28eb9 100644 --- a/layout/includes/header/post-info.pug +++ b/layout/includes/header/post-info.pug @@ -76,6 +76,10 @@ if theme.twikoo.visitor +pvBlock('','','') span#twikoo_visitors + default + 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 diff --git a/layout/includes/third-party/card-post-count/twikoo.pug b/layout/includes/third-party/card-post-count/twikoo.pug index 68ab35b07..314e4acad 100644 --- a/layout/includes/third-party/card-post-count/twikoo.pug +++ b/layout/includes/third-party/card-post-count/twikoo.pug @@ -28,7 +28,7 @@ script. if (typeof twikoo === 'object') { runTwikoo() } else { - getScript('!{theme.asset.twikoo}').then(runTwikoo) + getScript('!{url_for(theme.asset.twikoo)}').then(runTwikoo) } } diff --git a/layout/includes/third-party/card-post-count/valine.pug b/layout/includes/third-party/card-post-count/valine.pug index 2d422fdbb..ad1a9c606 100644 --- a/layout/includes/third-party/card-post-count/valine.pug +++ b/layout/includes/third-party/card-post-count/valine.pug @@ -6,8 +6,8 @@ script. el: '#vcomment', appId: '#{theme.valine.appId}', appKey: '#{theme.valine.appKey}', + serverURLs: '#{theme.valine.serverURLs}' } - const valine = new Valine(initData) } diff --git a/layout/includes/third-party/comments/twikoo.pug b/layout/includes/third-party/comments/twikoo.pug index 7ae8f6325..14c55e262 100644 --- a/layout/includes/third-party/comments/twikoo.pug +++ b/layout/includes/third-party/comments/twikoo.pug @@ -39,7 +39,7 @@ script. setTimeout(runFn,0) return } - getScript('!{theme.asset.twikoo}').then(runFn) + getScript('!{url_for(theme.asset.twikoo)}').then(runFn) } if ('!{use[0]}' === 'Twikoo' || !!{lazyload}) { diff --git a/layout/includes/third-party/math/katex.pug b/layout/includes/third-party/math/katex.pug index 9aa83017e..f69e8b84a 100644 --- a/layout/includes/third-party/math/katex.pug +++ b/layout/includes/third-party/math/katex.pug @@ -1,6 +1,6 @@ -link(rel="stylesheet" type="text/css" href=theme.asset.katex) +link(rel="stylesheet" type="text/css" href=url_for(theme.asset.katex)) script(src=url_for(theme.asset.katex_copytex)) -link(rel="stylesheet" type="text/css" href=theme.asset.katex_copytex_css) +link(rel="stylesheet" type="text/css" href=url_for(theme.asset.katex_copytex_css)) script. (() => { document.querySelectorAll('#article-container span.katex-display').forEach(item => { diff --git a/layout/includes/third-party/math/mathjax.pug b/layout/includes/third-party/math/mathjax.pug index f8b12bdcb..688e6dc82 100644 --- a/layout/includes/third-party/math/mathjax.pug +++ b/layout/includes/third-party/math/mathjax.pug @@ -37,7 +37,7 @@ script. } const script = document.createElement('script') - script.src = '!{theme.asset.mathjax}' + script.src = '!{url_for(theme.asset.mathjax)}' script.id = 'MathJax-script' script.async = true document.head.appendChild(script) diff --git a/layout/includes/third-party/math/mermaid.pug b/layout/includes/third-party/math/mermaid.pug index 6bd8185ec..5b7b496de 100644 --- a/layout/includes/third-party/math/mermaid.pug +++ b/layout/includes/third-party/math/mermaid.pug @@ -18,7 +18,7 @@ script. } const loadMermaid = () => { - window.loadMermaid ? runMermaid() : getScript('!{theme.asset.mermaid}').then(runMermaid) + window.loadMermaid ? runMermaid() : getScript('!{url_for(theme.asset.mermaid)}').then(runMermaid) } window.pjax ? loadMermaid() : document.addEventListener('DOMContentLoaded', loadMermaid) diff --git a/layout/includes/third-party/newest-comments/twikoo-comment.pug b/layout/includes/third-party/newest-comments/twikoo-comment.pug index 9896b14a7..e36262356 100644 --- a/layout/includes/third-party/newest-comments/twikoo-comment.pug +++ b/layout/includes/third-party/newest-comments/twikoo-comment.pug @@ -43,7 +43,7 @@ script. if (typeof twikoo === 'object') { runTwikoo() } else { - getScript('!{theme.asset.twikoo}').then(runTwikoo) + getScript('!{url_for(theme.asset.twikoo)}').then(runTwikoo) } } diff --git a/layout/includes/third-party/pjax.pug b/layout/includes/third-party/pjax.pug index de318d564..7b63ddd48 100644 --- a/layout/includes/third-party/pjax.pug +++ b/layout/includes/third-party/pjax.pug @@ -3,7 +3,7 @@ if theme.pjax.exclude each val in theme.pjax.exclude - pjaxExclude = pjaxExclude + `:not([href="${val}"])` -- let pjaxSelectors = ['title','#config-diff','#body-wrap','#rightside-config-hide','#rightside-config-show','.js-pjax'] +- let pjaxSelectors = ['head > title','#config-diff','#body-wrap','#rightside-config-hide','#rightside-config-show','.js-pjax'] - let choose = theme.comments.use if choose diff --git a/package.json b/package.json index 151d3c81e..c32e9158d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "4.2.1", + "version": "4.2.2", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": {