From 3a7be2f90f75e65584cfbe6516ebe522d7859e8f Mon Sep 17 00:00:00 2001
From: "1152958806@qq.com" <17683872107czx>
Date: Sun, 8 Oct 2023 17:16:27 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20katex=20pjax=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
templates/assets/js/heo.js | 6 +++++-
templates/modules/layouts/layout.html | 22 +---------------------
2 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js
index f158b700..7652e94c 100644
--- a/templates/assets/js/heo.js
+++ b/templates/assets/js/heo.js
@@ -599,6 +599,10 @@ $(document).ready((function() {
}
)),
document.addEventListener("pjax:complete", (function() {
- initBlog()
+ initBlog();
+ // 解决 katex pjax问题
+ if((GLOBAL_CONFIG.htmlType == 'post' || GLOBAL_CONFIG.htmlType == 'page') && typeof window.renderKaTex != 'undefined'){
+ window.renderKaTex();
+ }
}
));
\ No newline at end of file
diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html
index ec919597..23da3d7f 100644
--- a/templates/modules/layouts/layout.html
+++ b/templates/modules/layouts/layout.html
@@ -16,27 +16,7 @@
&& not #strings.isEmpty(theme.config.comments.walines.serverURL)}"
rel="stylesheet" th:href="${not #strings.isEmpty(theme.config.comments.walines.walinesCss) ? theme.config.comments.walines.walinesCss : 'https://cdn.cbd.int/@waline/client@2.15.7/dist/waline.css' }">
-
-
-
-
+