609d43b088
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
13 lines
527 B
HTML
13 lines
527 B
HTML
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
|
<script>
|
|
window.addEventListener("DOMContentLoaded", () => {
|
|
renderMathInElement(document.body, {
|
|
delimiters: [
|
|
{ left: "$$", right: "$$", display: true },
|
|
{ left: "$", right: "$", display: false },
|
|
{ left: "\\(", right: "\\)", display: false },
|
|
{ left: "\\[", right: "\\]", display: true }
|
|
],
|
|
ignoredClasses: ["gist"]
|
|
});})
|
|
</script> |