mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-28 22:20:17 +00:00
13 lines
869 B
HTML
13 lines
869 B
HTML
{{ if not (.Page.Scratch.Get "katex") }}
|
|
<!-- Include katext only first time -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/katex.min.css" integrity="sha384-BdGj8xC2eZkQaxoQ8nSLefg4AV4/AwB3Fj+8SUSo7pnKP6Eoy18liIKTPn9oBYNG" crossorigin="anonymous">
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/katex.min.js" integrity="sha384-JiKN5O8x9Hhs/UE5cT5AAJqieYlOZbGT3CHws/y97o3ty4R7/O5poG9F3JoiOYw1" crossorigin="anonymous"></script>
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
|
{{ .Page.Scratch.Set "katex" true }}
|
|
{{ end }}
|
|
|
|
<p class="katex{{ with .Get "class" }} {{ . }}{{ end }}">
|
|
$$ {{ .Inner }} $$
|
|
</p>
|
|
|