mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
fix: make KaTeX render all math inside document.body
(#994)
Since it only accepts one element, I cannot pass `.article-content` and `#TableOfContent` to it. The official documentation uses `document.body` directly, so I guess that's fine. closes https://github.com/CaiJimmy/hugo-theme-stack/issues/882
This commit is contained in:
parent
797949b37f
commit
609d43b088
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
renderMathInElement(document.querySelector(`.article-content`), {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
|
|
Loading…
Reference in a new issue