mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-02-06 11:53:31 +08:00
fix(comment/waline): cannot read property ‘insertBefore’ of null (#1103)
* fix: resolve issue with comments not displaying due to KaTeX and Waline render order * Fix the problem that comment data couldn't be pulled successfully and raise Error "Cannot read property ‘insertBefore’ of null""
This commit is contained in:
parent
839fbd0ecb
commit
0991f61d49
@ -1,7 +1,8 @@
|
|||||||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", () => {
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
renderMathInElement(document.body, {
|
const mainArticleElement = document.querySelector(".main-article");
|
||||||
|
renderMathInElement(mainArticleElement, {
|
||||||
delimiters: [
|
delimiters: [
|
||||||
{ left: "$$", right: "$$", display: true },
|
{ left: "$$", right: "$$", display: true },
|
||||||
{ left: "$", right: "$", display: false },
|
{ left: "$", right: "$", display: false },
|
||||||
|
Loading…
Reference in New Issue
Block a user