forked from Sync/hugo-theme-stack
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") -}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
renderMathInElement(document.body, {
|
||||
const mainArticleElement = document.querySelector(".main-article");
|
||||
renderMathInElement(mainArticleElement, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
@ -10,4 +11,4 @@
|
||||
],
|
||||
ignoredClasses: ["gist"]
|
||||
});})
|
||||
</script>
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user