2022-09-11 11:14:54 +08:00
|
|
|
{{ partialCached "scripts/global.html" . }}
|
|
|
|
|
2022-06-01 14:42:03 +08:00
|
|
|
{{- $vendor := .Site.Params.vendors.plugins }}
|
2022-07-13 21:25:15 +08:00
|
|
|
{{- $router := .Scratch.Get "router" }}
|
2022-07-22 17:16:34 +08:00
|
|
|
|
2022-09-11 11:14:54 +08:00
|
|
|
<!-- Load math render scripts -->
|
|
|
|
{{ $math := .Params.math | default .Site.Params.math }}
|
|
|
|
{{ if $math }}
|
|
|
|
{{- partialCached "scripts/plugins.html" (dict "vendor" $vendor "router" $router "res" .Site.Data.resources.plugins "index" $math) }}
|
|
|
|
{{ if eq $math "katex" }}
|
|
|
|
<script type="text/javascript">
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
|
|
renderMathInElement(document.body, {
|
|
|
|
delimiters: [
|
|
|
|
{left: '$$', right: '$$', display: true},
|
|
|
|
{left: '$', right: '$', display: false},
|
|
|
|
{left: '\\(', right: '\\)', display: false},
|
|
|
|
{left: '\\[', right: '\\]', display: true}
|
|
|
|
],
|
|
|
|
|
|
|
|
throwOnError : false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{{ end }}
|
|
|
|
{{ if eq $math "mathjax" }}
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.MathJax = {
|
|
|
|
tex: {
|
|
|
|
inlineMath: [["$", "$"]],
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
{{ end }}
|
2022-07-02 22:22:46 +08:00
|
|
|
{{ end }}
|
2022-09-11 11:14:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-31 11:02:55 +08:00
|
|
|
|