Add Katex files

This commit is contained in:
Will Faught
2023-02-14 15:08:16 -08:00
parent 80a36af3ee
commit 48cde6fd36
67 changed files with 10 additions and 29 deletions

View File

@@ -25,11 +25,7 @@
) }}
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
{{ partial "paige/link.html" (dict
"href" ($page.Param "paige.katex.style.link_href" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css")
"integrity" ($page.Param "paige.katex.style.link_integrity" | default "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/")
"raw" true
) }}
{{ partial "paige/link.html" (dict "href" "paige/katex/katex.min.css") }}
{{ end }}
{{ if .AlternativeOutputFormats }}

View File

@@ -47,17 +47,8 @@ addEventListener("resize", paigeResize);
"src" ($page.Param "paige.bootstrap.script.script_src" | default "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js")
) }}
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
{{ partial "paige/script.html" (dict
"integrity" ($page.Param "paige.katex.script.script_integrity" | default "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O")
"raw" ($page.Param "paige.katex.script.raw")
"src" ($page.Param "paige.katex.script.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js")
) }}
{{ partial "paige/script.html" (dict
"integrity" ($page.Param "paige.katex.autorender.script_integrity")
"onload" "renderMathInElement(document.body);"
"raw" ($page.Param "paige.katex.autorender.raw")
"src" ($page.Param "paige.katex.autorender.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js")
) }}
{{ partial "paige/script.html" (dict "src" "paige/katex/katex.min.js") }}
{{ partial "paige/script.html" (dict "onload" "renderMathInElement(document.body);" "src" "paige/katex/auto-render.min.js") }}
{{ end }}
{{ partial "paige/analytics.html" $page }}
<noscript>{{ i18n "paige_noscript" }}</noscript>