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' }"> - - - - +