Add support for LaTeX in posts
This commit is contained in:
parent
2e79b15c79
commit
b290e70ece
@ -1,2 +1,4 @@
|
||||
<!-- https://stackoverflow.com/a/70385342/1040915 -->
|
||||
<script src="js/custom.js" defer></script>
|
||||
<script src="js/custom.js" defer></script>
|
||||
<!-- https://mertbakir.gitlab.io/hugo/math-typesetting-in-hugo/ -->
|
||||
{{ if .Params.math }}{{ partial "helpers/katex.html" . }}{{ end }}
|
||||
|
4
blog/layouts/partials/helpers/katex.html
Normal file
4
blog/layouts/partials/helpers/katex.html
Normal file
@ -0,0 +1,4 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.0/dist/katex.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.0/dist/katex.min.js"></script>
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.0/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
|
Loading…
x
Reference in New Issue
Block a user