Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordataCobra <datacobra@thinkbot.de>2021-04-12 12:19:36 +0300
committerdataCobra <datacobra@thinkbot.de>2021-04-12 12:20:26 +0300
commitabbf98f38d5802e374dd1c6fed0675ddef798102 (patch)
treed0010d15b4f2452a89177f97ada6795aea3774e7
parent160c9b3662c9cf25cd1111e6ad8370fbdc9e706b (diff)
Fix #48 KaTeX inline not rendering
-rw-r--r--layouts/partials/head.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 0e1fe1e..8201a85 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -42,6 +42,16 @@
<link rel="stylesheet" href="{{ relURL "/css/katex.min.css" }}" crossorigin="anonymous">
<script defer src="{{ relURL "js/katex.min.js" }}" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="{{ relURL "js/auto-render.min.js" }}" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+ <script>
+ document.addEventListener("DOMContentLoaded", function() {
+ renderMathInElement(document.body, {
+ delimiters: [
+ {left: "$$", right: "$$", display: true},
+ {left: "$", right: "$", display: false}
+ ]
+ });
+ });
+ </script>
{{- end -}}
<!-- Use customcss if you like -->
{{- if isset .Site.Params "customcss" -}}