Merge pull request #125 from aidenybai/fix-latex
This commit is contained in:
commit
9d5777b934
@ -87,6 +87,15 @@
|
||||
{{if $.Site.Data.config.enableLinkPreview}}
|
||||
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
|
||||
{{end}}
|
||||
{{if $.Site.Data.config.enableLatex}}
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: '$$', right: '$$', display: true},
|
||||
{left: '$', right: '$', display: false},
|
||||
],
|
||||
throwOnError : false
|
||||
});
|
||||
{{end}}
|
||||
};
|
||||
attachSPARouting(draw);
|
||||
</script>
|
||||
|
@ -2,15 +2,4 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: '$$', right: '$$', display: true},
|
||||
{left: '$', right: '$', display: false},
|
||||
],
|
||||
throwOnError : false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user